Lorsque je lance " rake test TEST=test/unit/auction_test.rb" les tests s'exécutent TROIS fois ?! Y a-t-il une raison connue à celà ? (Rails 2.3.2 sur Ubuntu) ============================================ $ rake test TEST=test/unit/auction_test.rb (in /home/bach/Projects/rails/planetenchere) /usr/bin/ruby1.8 -I"lib:test" "/home/bach/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/unit/auction_test.rb" Loaded suite /home/bach/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader Started Creating 20 users . Finished in 0.792669 seconds. 1 tests, 2 assertions, 0 failures, 0 errors /usr/bin/ruby1.8 -I"lib:test" "/home/bach/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/unit/auction_test.rb" Loaded suite /home/bach/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader Started Creating 20 users . Finished in 0.4131 seconds. 1 tests, 2 assertions, 0 failures, 0 errors /usr/bin/ruby1.8 -I"lib:test" "/home/bach/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/unit/auction_test.rb" Loaded suite /home/bach/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader Started Creating 20 users . Finished in 0.414418 seconds. 1 tests, 2 assertions, 0 failures, 0 errors -- IciMarché fédère l'e-commerce de proximité http://icimarche.fr
on 2009-06-25 09:40
on 2009-06-25 09:48
Salut, Pour exécuter un seul test il faut utiliser la commande suivante: ruby -I test test/unit/auction_test.rb" car rake test exécute tous les tests. et avec un alias c'est plus pratique :-) alias rtest='ruby -I test' À +, Alexis.
on 2009-06-25 09:54
>> ruby -I test test/unit/auction_test.rb"
MERCIIIIII :-)
--
IciMarché fédère l'e-commerce de proximité
http://icimarche.fr
on 2009-06-25 14:37
Le 25 juin 09 à 09:39, philippe lachaise a écrit : > Lorsque je lance " rake test TEST=test/unit/auction_test.rb" les > tests s'exécutent TROIS fois ?! > > Y a-t-il une raison connue à celà ? rake test lance les test unitaire, fonctionnel et integration (3 parties) Je pense qu'il doit lancer chacune de ces parties avec ton test. Essaye aussi un rake test:units TEST="..." Sinon par rapport à ce que dis Alexis, un bon ruby ....rb fonctionne si tu as bien require ton test_helper.rb -- Cyril Mougel http://blog.shingara.fr
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.