NoMethodError

raise "a blog about rails, javascript, and other stuff"

Shoulda Matcher Model Extras

If you use RSpec with your Rails projects, chances are you also use shoulda_matchers (and if you don’t, what are you doing with your life?!). You probably already know all about the basic model matchers, like the ones below.

Association Extras

There are a ton of extra options you can use with the association matchers (pretty much any option you can pass to an association). Below are just a few.

Validation Extras

There are even more options for use with the validation matchers. Here’s a small sampling (including some mass assignment matchers).

These are just a few of the extras that shoulda_matchers offers. I would highly recommend that you read through the documentation to discover all the things you can do.

Comments