This project is archived and is in readonly mode.
Rake test executes the test suite three times if the environment variable TEST is set
-
calavera
- Tag changed from 2.x, patch, railties to 2.x, patch, railties, tiny
-
Xavier Noria
I personally invoke ruby to run a single test, but this patch seems good to go for me. The proposed behavior is consistent with rake's test, and eliminates the weird repetitions.
-
Rohit Arondekar
- State changed from new to open
- Importance changed from to Low
This is still an issue on Rails 3.
~/projects/rails/actionpack९ rake test TEST=test/controller/send_file_test.rb (in /home/rohit/projects/rails/actionpack) Loaded suite /home/rohit/.rvm/gems/ruby-1.9.2-p0@3-dev/gems/rake-0.8.7/lib/rake/rake_test_loader Started .............. Finished in 0.266826 seconds. 14 tests, 43 assertions, 0 failures, 0 errors, 0 skips Test run options: --seed 28510 Loaded suite /home/rohit/.rvm/gems/ruby-1.9.2-p0@3-dev/gems/rake-0.8.7/lib/rake/rake_test_loader Started .............. Finished in 0.267281 seconds. 14 tests, 43 assertions, 0 failures, 0 errors, 0 skips Test run options: --seed 13281 ~/projects/rails/actionpack९ ruby -Itest test/controller/send_file_test.rb Loaded suite test/controller/send_file_test Started .............. Finished in 0.265577 seconds. 14 tests, 43 assertions, 0 failures, 0 errors, 0 skips Test run options: --seed 38963Although it's documented in RUNNING_UNIT_TESTS that single tests are to be run using
ruby—== Running by hand If you only want to run a single test suite, or don't want to bother with Rake, you can do so with something like: ruby -Itest test/controller/base_tests.rbI think this should work with Rake as well.
The patch doesn't apply any more, can somebody please rebase it?
-
Aditya Sanghi
- Assigned user set to Xavier Noria
Okay, rebased and credit given to David. Please check.
-
Xavier Noria
There's a typo "EVN", fixing and testing with an app.
-
Repository
- State changed from open to resolved
(from [ab2f2b22a6d0656f719c294d40e35d21c752ba8c]) prevent rake test to run the test suite three times when ENV['TEST'] is set [#3572 Rake test executes the test suite three times if the environment variable TES... state:resolved]
Signed-off-by: Xavier Noria fxn@hashref.com
http://github.com/rails/rails/commit/ab2f2b22a6d0656f719c294d40e35d...
