Class: RSpecJSONAPISerializer::Matchers::HaveIdMatcher
- Defined in:
- lib/rspec_jsonapi_serializer/matchers/have_id_matcher.rb
Instance Method Summary collapse
Methods inherited from Base
#failure_message_when_negated, #initialize
Constructor Details
This class inherits a constructor from RSpecJSONAPISerializer::Matchers::Base
Instance Method Details
#failure_message ⇒ Object
14 15 16 |
# File 'lib/rspec_jsonapi_serializer/matchers/have_id_matcher.rb', line 14 def "expected that #{serializer_name} to have id :#{expected}, got :#{actual} instead" end |
#matches?(serializer_instance) ⇒ Boolean
8 9 10 11 12 |
# File 'lib/rspec_jsonapi_serializer/matchers/have_id_matcher.rb', line 8 def matches?(serializer_instance) @serializer_instance = serializer_instance actual == expected end |