waterlink / rspec-json_expectations

Set of matchers and helpers to allow you test your APIs responses like a pro.
https://www.relishapp.com/waterlink/rspec-json-expectations/docs
MIT License
140 stars 23 forks source link

feature: regex matching of string values #3

Closed waterlink closed 9 years ago

waterlink commented 10 years ago

example:

  expect(response_body).to include_json(
    entity_code: "somecode",
    entity_url: %r{api/v1/entitites/somecode}
  )

Given that response_body["entity_url"] has full url (with schema, domain, you know), it will match this string only partially, as a regex.