refactor @raises to assert_raises