refactor assertions are smart: replace try/rescue block by assert_raise