From: Richard Date: 2006-12-03T13:40:05+09:00 Subject: Re: Why does a test fail when I predicted it's exception class? Hi Robert & Louis, You guys were right on! Below is one of my actual test sets, the one with the exception testing. It is more complicated than the toy I posted, so it took me a few syntax-errors to get it to work. But then I got my desired: 17 tests, 17 assertions, 0 failures, 0 errors Thank you very much for your responses. Best wishes, Richard require '.\RevPolishEvaluator.rb' class ErrorTests < Test::Unit::TestCase # The succinct way def test1_noarg; assert_raise(ArgumentError) {Polish.new().eval}; end def test2_badop; assert_raise(ArgumentError) {Polish.new(%w{2 3 $ 7 -- *}).eval}; end def test3_missingdata; assert_raise(ArgumentError) {Polish.new(%w{2 +}).eval}; end def test4_divby0; assert_raise(ZeroDivisionError) {Polish.new(%w{2 0 /}).eval}; end end