Shoulda Testing Cheat Sheet

September 12th, 2008

Updated 10/1/08: Modified for the release of Shoulda 2.0.

Updated 9/26/08: Fixed some typos and omissions.  Added should_route and should_render_with_layout (Thanks to Dan Croak and Michal Szajbe).

I’ve created a basic Shoulda cheat sheet.  Along with Topfunky’s Ruby on Rails Testing Cheat Sheet, it should be a good reference, especially for those migrating from RSpec.

Shoulda Cheat Sheet

Shoulda Cheat Sheet

7 responses

  1. Chris comments:

    Pretty nice - this one’s getting printed out and taped to my wall!

  2. Pablo comments:

    really useful. Thnx!

  3. Josh Nichols comments:

    After seeing this, I immediately thought of cheat, ie cheat.errtheblog.com.

    There was a shoulda cheat, but I updated it to include examples, to organize them, etc:

    http://cheat.errtheblog.com/s/shoulda/

  4. Redd Vinylene comments:

    Real nice, real nice… this shit goes up on my wall too, make no mistake!

  5. Michał Szajbe comments:

    Very useful sheet.

    There’s one mistake though - should_set_flash_to needs to be changed to should_set_the_flash_to.

  6. Steven comments:

    Great resource… I’ve added it to http://TechCheatSheets.com

  7. Alex comments:

    Awesome work. I use this all the time.

Leave a comment