# 'cheat assertions' for the rest
assert_raise(*args) {|| ...}
Passes if the block raises one of the given exceptions.
Examples:
assert_raise RuntimeError, LoadError do
raise 'Boom!!!'
end
assert_raise(ActionController::RoutingError) {
assert_routing 'invalid/url', { }
}cheat sheets.
$ cheat assert_raise( add new | see all )
- updated sheets

- mysql_select
- cheat
- cryptsetup
- burm
- perl
- port
- yuilang
- queriac
- mechanize
- sness
- nonsense
- haml
- git
- assert_valid
- marsmission
Advertisement