rake测试发现测试。自动测试找不到它们

时间:2010-01-08 03:39:24

标签: ruby-on-rails testing bdd autotest zentest

$ rake test
$ rake test
(in /Users/ethan/project/mtc/completestreets)
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -I"lib:test" "/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"  
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -I"lib:test" "/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/functional/mtc_user_sessions_controller_test.rb" "test/functional/sessions_controller_test.rb" 
Loaded suite /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader
Started
...
Finished in 0.119673 seconds.

3 tests, 3 assertions, 0 failures, 0 errors
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -I"lib:test" "/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"  
Loaded suite /usr/bin/rake
Started

Finished in 0.000228 seconds.

0 tests, 0 assertions, 0 failures, 0 errors

$ autotest
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -I.:lib:test -rubygems -e "%w[test/unit test/test_helper.rb].each { |f| require f }" | unit_diff -u
Loaded suite -e
Started

Finished in 0.000207 seconds.

0 tests, 0 assertions, 0 failures, 0 errors

任何有启发性的见解?

1 个答案:

答案 0 :(得分:2)

嘿,我想你会在这里找到答案:ZenTest autotest not running tests

很多人有一段时间没有这个问题,并通过降级ZenTest解决了这个问题 - 我不知道如果这会帮助你......你还在哪个版本?

这里有一个非常酷的教程,它向您展示如何使用rspec和growl(或GnomeNotify)运行自动测试:http://www.railstutorial.org/chapters/static-pages#sec:installing_autotest以防您感兴趣