No commit activity in last 3 years
No release in over 3 years
RSpec matchers useful to test web APIs.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0

Runtime

 Project Readme

RSpecApi::Matchers

RSpecApi::Matchers lets you express outcomes on the response of web APIs.

expect(response).to have_status(:not_found)

The full documentation is available at rubydoc.info.

More information about the parent project RSpecApi is available at rspec-api.github.io

Build Status Code Climate Coverage Status Dependency Status

Available matchers

expect(response).to have_status(:ok)
expect(response).to have_content_type(:json)
expect(response).to have_page_links
expect(response).to be_a_collection
expect(response).to be_wrapped_in_callback('alert')
expect(response).to be_sorted(by: :id, verse: :desc)
expect(response).to be_filtered(by: :id, value: 10, compare_with: :>)
expect(response).to have_attributes(id: {value: 1.2}, url: {type: {string: :url}})

How to install

To install on your system, run gem install rspec-api-matchers. To use inside a bundled Ruby project, add this line to the Gemfile:

gem 'rspec-api-matchers', '~> 0.6.0'

The rspec-api-matchers gem follows Semantic Versioning. Any new release that is fully backward-compatible bumps the patch version (0.0.x). Any new version that breaks compatibility bumps the minor version (0.x.0)

Indicating the full version in your Gemfile (major.minor.patch) guarantees that your project won’t occur in any error when you bundle update and a new version of RSpecApi::Matchers is released.

How to contribute

Don’t hesitate to send me code comments, issues or pull requests through GitHub!

All feedback is appreciated. Thanks :)