---
title: Shoulda Matchers 2.0
teaser:
tags: news,web,ruby,testing,shoulda
author: Jason Draper
published_on: 2013-04-03
---

[Shoulda Matchers](https://github.com/thoughtbot/shoulda-matchers) has been
around for a long time. Unfortunately, it's starting to suffer from feature
bloat so we're narrowing its focus to keep releases fast and the maintenance
burden low.

## Removing Deprecated Matchers

The following matchers were deprecated in 1.5 and will be removed in 2.0 . If
you're currently using these methods you should consider testing the code in
another way.

### assign\_to

The `assign_to` matcher allows you to ensure you have set an instance variable
properly. We do not use this because we typically cover those types of
assertions implicitly through an integration test. An integration test may be
slower than a unit test, but it provides more thorough coverage.

### validate\_format\_of

The `validate_format_of` matcher allows you to perform the same operation as the
`allow_value` matcher. Please use the `allow_value` matcher instead.

    should validate_format_of(:email).with('user@example.com')
    should allow_value('user@example.com').for(:email )

### have\_sent\_email

We recommend [email-spec](https://github.com/bmabey/email-spec) for testing
emails in your apps. It has the added benefit of working with your integration
suite as well as your unit tests.

### respond\_with\_content\_type

The `respond_with_content_type` matcher is not a matcher we use often. This
behavior can be tested using the response object in your controller tests
without the need for a matcher.

### query\_the\_database

We do not have a recommended solution for a replacement on this matcher.

## Matchers Removed Temporarily

The `strong_parameters` and `delegate` matchers will also be removed in 2.0. We
ran into some trouble implementing them but hope to re-implement them in a less
troublesome way soon.

## New Hotness

![''](http://media.tumblr.com/6d8bf8deae4bddb6c839bc89924e5fc2/tumblr_inline_mkouu7OOMW1qz4rgp.jpg)

As part of the move to 2.0, we will also be dropping support for Rails 2 &amp;
ruby 1.8. We will continue to support Rails 3.x and ruby 1.9.x and will be
adding support for ruby 2.0 soon.

## Keeping it tight

We are trying to keep Shoulda Matchers a tight focused gem and make sure the
matchers we do support are as robust and thorough as possible. Do you think
there are any other matchers we should remove?
