Class: RSpecJSONAPISerializer::Matchers::BelongToMatcher
- Inherits:
-
Object
- Object
- RSpecJSONAPISerializer::Matchers::BelongToMatcher
- Defined in:
- lib/rspec_jsonapi_serializer/matchers/belong_to_matcher.rb
Instance Method Summary collapse
- #description ⇒ Object
- #failure_message ⇒ Object
- #failure_message_when_negated ⇒ Object
- #id_method_name(value) ⇒ Object
-
#initialize(expected) ⇒ BelongToMatcher
constructor
A new instance of BelongToMatcher.
- #matches?(serializer_instance) ⇒ Boolean
- #object_method_name(value) ⇒ Object
- #serializer(value) ⇒ Object
Constructor Details
#initialize(expected) ⇒ BelongToMatcher
Returns a new instance of BelongToMatcher.
8 9 10 |
# File 'lib/rspec_jsonapi_serializer/matchers/belong_to_matcher.rb', line 8 def initialize(expected) @association_matcher = AssociationMatcher.new(expected, :belong_to, :belongs_to) end |
Instance Method Details
#description ⇒ Object
28 29 30 |
# File 'lib/rspec_jsonapi_serializer/matchers/belong_to_matcher.rb', line 28 def description association_matcher.description end |
#failure_message ⇒ Object
32 33 34 |
# File 'lib/rspec_jsonapi_serializer/matchers/belong_to_matcher.rb', line 32 def association_matcher. end |
#failure_message_when_negated ⇒ Object
36 37 38 |
# File 'lib/rspec_jsonapi_serializer/matchers/belong_to_matcher.rb', line 36 def association_matcher. end |
#id_method_name(value) ⇒ Object
16 17 18 |
# File 'lib/rspec_jsonapi_serializer/matchers/belong_to_matcher.rb', line 16 def id_method_name(value) association_matcher.id_method_name(value) end |
#matches?(serializer_instance) ⇒ Boolean
12 13 14 |
# File 'lib/rspec_jsonapi_serializer/matchers/belong_to_matcher.rb', line 12 def matches?(serializer_instance) association_matcher.matches?(serializer_instance) end |
#object_method_name(value) ⇒ Object
20 21 22 |
# File 'lib/rspec_jsonapi_serializer/matchers/belong_to_matcher.rb', line 20 def object_method_name(value) association_matcher.object_method_name(value) end |
#serializer(value) ⇒ Object
24 25 26 |
# File 'lib/rspec_jsonapi_serializer/matchers/belong_to_matcher.rb', line 24 def serializer(value) association_matcher.serializer(value) end |