$ command line cheat sheets
Cheat Sheet Title: [ no_spaces_alphanumeric_only ]
Cheat Sheet:# 'cheat assertions' for the rest assert_raise(*args) {|| ...} Passes if the block raises one of the given exceptions. Returns the thrown exception. Examples: assert_raise RuntimeError, LoadError do raise 'Boom!!!' end assert_raise(ActionController::RoutingError) { assert_routing 'invalid/url', { } } # to check the message/class of the exception exception = assert_raise RuntimeError, LoadError do ... end puts exception.message puts exception.class
Your cheat sheet will be editable (fixable) by anyone. Each cheat sheet is essentially a wiki page. It may also be used by millions of people for reference purposes from the comfort of their command line. If this is okay with you, please save.