代码之家  ›  专栏  ›  技术社区  ›  Ethan

Rake测试发现测试。自动测试没有找到它们

  •  2
  • Ethan  · 技术社区  · 15 年前
    $ 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 回复  |  直到 15 年前
        1
  •  2
  •   Community Anvaka    7 年前

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

    很多人在不久前就有了这个问题,并通过降低Zentest来解决它-我不知道这是否会帮助你…你到底用的是哪个版本?

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