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.



39
40
41
42
# File 'lib/metaractor/spec.rb', line 39

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

Instance Method Details

#at_path(*path) ⇒ Object



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

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

#does_not_match?(actual) ⇒ Boolean

Returns:

  • (Boolean)


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

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

#matches?(actual) ⇒ Boolean

Returns:

  • (Boolean)


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

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