Testing: 'test "..." do' works but not 'def test...'

I have just encountered a funny situation. I have a number of
functional and unit cases that are all written with the notation:

def ----

#test case

end

I just created a new model and controller with test cases written in a
similar format. When I run the test cases, no test are actually run
(i see, “0 tests, 0 assertions, 0 failures, 0 errors”). If I convert
to the format:

test “----” do

end

It works. All my old test cases work as expected. As far as I can
tell everything is set up the same way.

Any idea why this might be happening?

Quoting drewB [email protected]:

I just created a new model and controller with test cases written in a
similar format. When I run the test cases, no test are actually run
(i see, “0 tests, 0 assertions, 0 failures, 0 errors”). If I convert
to the format:

test “----” do

end

Just to clarify, the first case is actually

def test_—
#test case
end

Methods with the “test_” prefix are run, others are assumed to be
supporting
code.

Jeffrey

That was it. I didn’t know you had to start with “test.” Thanks so
much!