Module: RESTful::Matchers

Defined in:
lib/restful/matchers/have_restful_json_link.rb

Defined Under Namespace

Classes: HaveRestfulJsonLink

Instance Method Summary collapse

Instance Method Details

Ensures that JSON response body has the given link.

Example:

response.body.should have_json_link("self", "http://example.com")


10
11
12
# File 'lib/restful/matchers/have_restful_json_link.rb', line 10

def have_restful_json_link(rel, href = nil)
  HaveRestfulJsonLink.new(rel, href)
end