Class: RSpecApi::Matchers::Json::Matcher

Inherits:
Response::Matcher show all
Defined in:
lib/rspec-api/matchers/json/matcher.rb

Instance Attribute Summary

Attributes inherited from Response::Matcher

#response

Instance Method Summary collapse

Methods inherited from Response::Matcher

#failure_message_for_should, #failure_message_for_should_not

Instance Method Details

#descriptionObject



14
15
16
# File 'lib/rspec-api/matchers/json/matcher.rb', line 14

def description
  %Q(be valid JSON)
end

#matches?(response) ⇒ Boolean Also known as: ==

Returns:

  • (Boolean)


9
10
11
# File 'lib/rspec-api/matchers/json/matcher.rb', line 9

def matches?(response)
  super && json
end