From: Masaki Suketa Date: 2001-11-11T19:09:10+09:00 Subject: [ruby-talk:24870] Re: assert_exception_and_message Hello, In message "[ruby-talk:24706] assert_exception_and_message" on 01/11/09, Robert Feldt writes: > I didn't find a way in RubyUnit to check both an exception and its error > message. Maybe its there somewhere. If not here's one version: RubyUnit does not check error message because I am not sure that it should be checked by RubyUnit. Instead of checking error message, assert_exception returns the exception if expected exception raised. So you can check error message by checking return value if you want. exception = assert_exception(YourException) { .... } assert_equal("error message", exception.message) Regards, Masaki Suketa