Ruby, Rails, Test::Rails Cheat Sheet 29 comments

posted Thursday, August 24, 2006 by topfunky

A cheat sheet that shows the assertions in Test::Unit, the ones added by Rails, and the ones further added by Test::Rails (part of the ZenTest gem).

Ruby, Rails, Test::Rails Cheat Sheet

29 comments

Leave a response

  • Gravatar icon Tom

    Yay!

  • Any chance of a non-PDF version?

  • Oh man I’ve been hoping for an asserts cheat sheet, thanks so much.

  • yeah – thats pretty cool thanks a lot

  • Thank you, thank you, thank you!!

  • This is poetry.

  • Gravatar icon SR

    Perfect! I was just trying to find a list of the methods I can use in my tests, and then this shows up. I’ve added it to http://techcheatsheets.com/

  • Liking this one.. thanks :)

  • Thanks a bunch.. I love cheatsheets. I found a couple for Ruby On Rails which I find handy… get them here and here.

    Bart

  • Brilliant! I didn’t realize how much I wanted this until I saw it.

    One comment though – the white text on the light gray background (Standard Assertions etc) is almost invisible on my screen.

  • Gravatar icon Michael Wei

    Thank you, thank you, this is really useful!

  • Gravatar icon Jim

    I thought only games have cheats!!

  • Gravatar icon airmalik

    Thanks Geoffrey! One request – can you please add http response codes and their rails identifiers for functional test? Perhaps on the back page?

  • This is great. I do have a couple suggestions. Some Rails assertions seem to be missing like assert_success, assert_no_cookie for instance. Perhaps those are in Edge Rails. The other item is determining which set of assertions belong to which group. Perhaps a label for each grouping?

    Thanks, Kevin

  • Gravatar icon topfunky

    Some assertions have been deprecated, so I left them out (assert_success is one of those, I think).

    assert_cookie is a not part of the Rails core as far as I can tell. I listed Test::Rails assertions because it is a useful package and I’m using it for my apps now.

    I’ll make the group label more obvious.

  • Gravatar icon railsn00b

    Sweet! Not being a ‘real’ developer, now all I need is a Peepcode on testing and I’ll be writing some quality code instead of these hacks!

  • Gravatar icon Carlos

    Thanks, I love it very helpful.

    Question: I love the quality of the cheat sheet what tool or editor do you use to create your cheat sheets? I use Rspec for my testing and I would like to put out a cheat sheet for the BDD folks.

  • Gravatar icon topfunky

    @railsn00b: You’re in luck…a PeepCode on testing is coming next month.

    @Carlos: I use OmniGraffle (also the preferred tool of Amy Hoy and many others).

    http://www.omnigroup.com/applications/omnigraffle/

  • Thanks Geoffrey, for the info on OmniGraffle. I plan to post some helpful (I hope) cheat sheets very soon to: http://www.blog.notesonrails.com/

  • Geoffrey, thanks again for pointing me toward OmniGraffle, it is very cool tool. Here is the first cheatsheet I created with it: http://www.blog.notesonrails.com/articles/2006/09/06/rspec-cheatsheet

  • Gravatar icon Hal

    Stumbled upon this while looking for something else. Very useful and good looking. Excellent stuff!

  • Nice work. Very professional looking.

  • Thanks – liking this one !!

  • Gravatar icon GregL

    How about the various rake commands?

  • that helped me really out, good work!

    merry xmas to all.

  • i really like those nifty cheat sheets. great stuff!

  • Gravatar icon Harry

    Yeah… thats whut am talkin about… nice job…

  • Gravatar icon ed

    That was very useful!

    Thanks

  • Gravatar icon Supriya

    thank you very much

Your Comment

Nuby on Rails

Geoffrey Grosenbach / Ruby / Code / Graphics / Design / Rails / Merb / Javascript / CSS

Manufactured with

Subscribe

Subscribe (RSS)