Ruby, Rails, Test::Rails Cheat Sheet 33 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

33 comments

Leave a response

  • 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.

  • 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.

  • Michael Wei

    Thank you, thank you, this is really useful!

  • Jim

    I thought only games have cheats!!

  • 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

  • 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.

  • 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!

  • 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.

  • 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

  • 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 !!

  • 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!

  • Harry

    Yeah… thats whut am talkin about… nice job…

  • ed

    That was very useful!

    Thanks

  • Supriya

    thank you very much

  • Nice work. Looks really good.

  • Thank you, thank you, this is really useful!

  • Very nice cheat sheet! Very helpful! Makes me feel a bit like a cheater though… ;-)

  • thx! i’ve been looking for something like this for ages…

Your Comment

Nuby on Rails

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

Manufactured with

Subscribe

Subscribe (RSS)