Sha256: 1a2b94d4cd1badc481283a7a54c2283bb552044dc9dfc0e7059e16eb40866dc5

Contents?: true

Size: 1.13 KB

Versions: 1

Compression:

Stored size: 1.13 KB

Contents

# Shoulda-Kept-Assign-To
By [Tinfoil Security](http://tinfoilsecurity.com/)

[![Build Status](https://travis-ci.org/tinfoil/shoulda-kept-respond-with-content-type.svg?branch=master)](https://travis-ci.org/tinfoil/shoulda-kept-respond-with-content-type)

Shoulda-matchers, ([official Git repo](https://github.com/thoughtbot/shoulda-matchers)), 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)

```ruby
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:

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

Shoulda will automatically include matchers into the appropriate example groups.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shoulda-kept-respond-with-content-type-1.1.0 README.md