Index ¦ Archives ¦ RSS > Tag: rspec

Some Custom Matchers for RSpec with Shoulda

It should have a valid factory

I use Factory Girl in my tests, and I have found it useful to check that I have valid factories for each model in my tests/specs. Here is a matcher you can use for that purpose.

Add this file to spec/support. Then …

© James Lim. Built using Pelican. Theme by Giulio Fidente on github.