Class: Metaractor::Spec::Matchers::IncludeErrors

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/metaractor/spec.rb

Instance Method Summary collapse

Constructor Details

#initialize(*expected) ⇒ IncludeErrors

Returns a new instance of IncludeErrors.



43
44
45
46
# File 'lib/metaractor/spec.rb', line 43

def initialize(*expected)
  @expected = expected
  @include = RSpec::Matchers::BuiltIn::Include.new(*@expected)
end

Instance Method Details

#at_path(*path) ⇒ Object



58
59
60
61
# File 'lib/metaractor/spec.rb', line 58

def at_path(*path)
  @path = path
  self
end

#does_not_match?(actual) ⇒ Boolean

Returns:

  • (Boolean)


53
54
55
56
# File 'lib/metaractor/spec.rb', line 53

def does_not_match?(actual)
  @actual = actual
  @include.does_not_match?(full_messages)
end

#matches?(actual) ⇒ Boolean

Returns:

  • (Boolean)


48
49
50
51
# File 'lib/metaractor/spec.rb', line 48

def matches?(actual)
  @actual = actual
  @include.matches?(full_messages)
end