From: Wayne Blair Date: 2001-05-18T06:11:24+09:00 Subject: [ruby-talk:15342] Re: help with rubyunit > I've been using RUnit for a few weeks now and it has always counted > assertions when I run it. Yeah, you're right. Sometimes my fingers move faster than my brain. Now that you've pointed out his question about assertion counting, I tested it myself and I also didn't get the assertions counted in the 'tested class'. It counts assertions made in the TestCase class, but not the class being tested. class HackTests < RUNIT::TestCase @@testHack = Hack.new def test_foo assert_equal(3, @@testHack.foo) end def test_foo2 assert_equal(21, @@testHack.foo2(7)) end end class Hack include RUNIT::Assert def foo assert(3==3) # this assert does not appear to be counted return 3 end def foo2(arg1) return arg1 * 3 end end irb(main):002:0> Tester.runTests HackTests#test_foo . HackTests#test_foo2 . Time: 0.0 OK (2/2 tests 2 asserts) Looking into source for why this is happening.... Wayne