| Class | ActiveMatchers::Matchers::AssociationMatcher |
| In: |
lib/matchers/association_matcher.rb
|
| Parent: | Object |
# File lib/matchers/association_matcher.rb, line 4 4: def initialize(macro, *attributes) 5: @macro = macro 6: @attributes = attributes 7: end
# File lib/matchers/association_matcher.rb, line 14
14: def failure_message
15: "Error: #{@error}"
16: end
# File lib/matchers/association_matcher.rb, line 9
9: def matches?(model)
10: @model = model
11: confirm_association
12: end
# File lib/matchers/association_matcher.rb, line 23
23: def through(assoc)
24: @options ||= {}
25: @options[:through] = assoc
26: self
27: end