From: Dmitri Colebatch Date: 2003-01-09T11:25:55+09:00 Subject: Re: Test::Unit fails w/no tests [was: testunit 0.1.6 problems] Hey all, new to ruby and to the list, but this seems as good a thread as any to join in with (o: > > > In my mind, there's nothing whatsoever wrong with an empty unit test. absolutely. imho testunit should resemble junit - two reasons why, I know junit (o: but also (correct me if I'm wrong) junit is the de facto standard in open source unit testing, yes? > > I tend to agree with Gavin that an empty unit test shouldn't be flagged as > > a failure. I use them for placeholders too. > > I can see that. But playing devil's advocate, I think I see > the reasoning the other way also. > > Aren't the XPers always saying, "Write the test first. Since the code > doesn't exist yet, the test will fail." A new test, then, fails by > default. This was perhaps someone's thinking. But I haven't read this > whole thread. that argument then leads to "testing the test" - saying that def test_foo end is a failing test is the same as saying that def test_bar bar = Bar.new("bar") end fails because it should really be def test_bar bar = Bar.new("bar") assert_equal("bar", b.bar, "bar not bar") end but like you say - its a moot point really, all tests should check something. cheers dim