Module: RSpecApi::Matchers::Json
- Included in:
- RSpecApi::Matchers
- Defined in:
- lib/rspec-api/matchers/json/matcher.rb,
lib/rspec-api/matchers/json/be_valid_json.rb
Defined Under Namespace
Classes: Matcher
Instance Method Summary collapse
-
#be_valid_json ⇒ Object
Passes if the object has valid JSON or JSONP in the body.
Instance Method Details
#be_valid_json ⇒ Object
Note:
The JSONP option is debatable, since an API that returns a JSONP should probably set the content-type to application/javascript.
Passes if the object has valid JSON or JSONP in the body
25 26 27 |
# File 'lib/rspec-api/matchers/json/be_valid_json.rb', line 25 def be_valid_json RSpecApi::Matchers::Json::Matcher.new end |