2
$ 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

有什么启发性的见解吗?

4

1 回答 1

2

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

很多人不久前遇到过这个问题,并通过降级 ZenTest 解决了这个问题——我不知道这是否会对你有所帮助......你现在使用的是哪个版本?

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

于 2010-01-08T08:27:54.103 回答