We haven’t been taking pull requests on shoulda-matchers as much as we shoulda, but it’s back in the spotlight now. Shoulda’s been gone … but it’s back.

Here are the new features in shoulda-matchers 1.1.0:

  • A NEWS file so you can track new hottness in REAL TIME
  • shoulda-matchers' very first dependency: ActiveSupport >= 3.0.0. This was an implicit dependency for a while, but now it’s official.
  • An only_integer option for validates_numericality_of
  • A query_the_database matcher, so that you can do it { should query_the_database(4.times).or_less }
  • Database column primality is correctly checked
  • The flash matcher can check specific keys using [], like so: it { should set_the_flash[:alert].to("Bad username") }
  • A validates_confirmation_of matcher: it { should validate_confirmation_of(:password) }
  • A serialize matcher: it { should serialize(:details).as(Hash).as_instance_of(Hash) }
  • A have_sent_email matcher can now check reply_to: it { should have_sent_email.reply_to([user, other]) }
  • An accept_nested_attributes matcher

If you filed a pull request and we didn’t take a look, please re-submit or ping me on Github. We’d love to hear from you.

Hound automatically reviews Ruby, JavaScript, and CoffeeScript code in your GitHub pull requests and comments on style violations. It is free for open source repos and $12/month per private repo.