No commit activity in last 3 years
No release in over 3 years
We miss the respond_with_content_type matcher in shoulda-matchers.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

Shoulda-Kept-Assign-To

By Tinfoil Security

Build Status

Shoulda-matchers, (official Git repo), removed the respond_with_content_type matcher in version 2.0.0. We missed it dearly, enough to bring it back. This gem includes all of the current version of shoulda-matchers, and it adds the 'respond_with_content_type' matcher back in, just the way it was before it was mercilessly destroyed.

Example (from shoulda-matchers, v1.5)

describe PostsController, "#show" do
  it { should permit(:title, :body).for(:create) }

  context "for a fictional user" do
    before do
      get :show, :id => 1
    end

    it { should respond_with_content_type(:json) }
  end
end

Installation

In Rails 3 and Bundler, add the following to your Gemfile:

group :test do
  gem "shoulda-kept-respond-with-content-type"
end

Shoulda will automatically include matchers into the appropriate example groups.