"rake TEST=test/unit/whatever_test.rb" is executed 3 times

Hi you all,
I execute "rake TEST= test/unit/whatever_test.rb, and it is executed 3
times. That it, the output is something like:

c:/ruby … “test/unit/whatever_test.rb”
Loaded suite …
Started
F
Finished in 0.8

1 tests, 1 assertions, 1 failures, 0 errors

c:/ruby … “test/unit/whatever_test.rb”
Loaded suite …
Started
F
Finished in 0.8

1 tests, 1 assertions, 1 failures, 0 errors

c:/ruby … “test/unit/whatever_test.rb”
Loaded suite …
Started
F
Finished in 0.8

1 tests, 1 assertions, 1 failures, 0 errors

And at the end:
Errors running test:units, test:functionals and test:integration!

Is this a normal behaviour?
The test is the default one when you create a model and I’m using Ruby
1.8.6. and Rails 2.1.2. rake version is 0.8.6

On May 3, 1:15 pm, Damaris F. [email protected] wrote:

Hi you all,

Is this a normal behaviour?
The test is the default one when you create a model and I’m using Ruby
1.8.6. and Rails 2.1.2. rake version is 0.8.6

If you want to run just one test I’d do ruby -Itest test/unit/
foo_test.rb

I think the issue is that the default task in a rails project runs 3
sub tasks: test:units, test:functionals and test:integration. Each of
these tasks then pickup the TEST environment variable you’ve set

Fred

Or you could try

rake test:units TEST=test/unit/whatever_test.rb

if it is a unit test for example

Ok, thanks, that works.