Test::Unit::TestCase#test => What's this method for?

Hi all

I found on this page a neat function that allows to write more semantic
test method names:

With it one can create tests instead of

def test_add_should_do_this_or_that

end

the following way:

test “add should do this or that” do

end

It enhances the Test::Unit::TestCase class. So far, so good.

Now one time I’ve forgotten to include this new definition. When running
my tests I got the error

test/unit/country_test.rb:8:in `test’: wrong number of arguments (1 for
2) (ArgumentError)

This tells me that there already is some sort of test function! I
couldn’t find any specification about this method, so I fear that maybe
I overwrite an important method by including the script above!

Anyone can tell me more about this issue? Thanks a lot.
Josh

Joshua M. wrote:

I found on this page a neat function that allows to write more semantic
test method names:

Jay Fields' Thoughts: Rails: ActiveRecord Unit Testing

You might want (IIRC) Behavior Driven Development. That’s a re-skinning
of
Test-Driven Development, using systems that easily generate Domain
Specific
Languages.

The market leader there is RSpec, so look that up.


Phlip
"Pigleg too?", week 1