Class: Neo4j::RSpec::Matchers::HasN::With::ModelClassMatcher
- Inherits:
-
Base
- Object
- Base
- Neo4j::RSpec::Matchers::HasN::With::ModelClassMatcher
show all
- Defined in:
- lib/neo4j/rspec/matchers/has_n.rb
Instance Attribute Summary
Attributes inherited from Base
#expected
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#description ⇒ Object
50
51
52
|
# File 'lib/neo4j/rspec/matchers/has_n.rb', line 50
def description
"with #{expected.join(', ')} model class"
end
|
#match(association) ⇒ Object
45
46
47
48
|
# File 'lib/neo4j/rspec/matchers/has_n.rb', line 45
def match(association)
actual = Array(association.model_class)
actual & expected == actual
end
|