2017-05-12 65 views
0

我一直一字一字地跟着教程,我正在使用Cloud9平臺進行跟蹤。 我應該運行:$軌測試
我應該得到:2次的測試中,2個斷言,0失敗,0失誤,0跳過Michael Hartl第3.3.1章Rails測試錯誤信息

我不知道,如果我跑錯命令,因爲我使用Cloud9,但是當我運行該程序時頁面可以正常工作,這意味着我不應該得到任何錯誤。這幾乎就好像測試從來沒有運行過。有任何想法嗎?

輸入代碼,他(靜態頁)$軌測試 通過Spring預加載過程5822個 運行選項運行:--seed 31158

運行:

...

完成了0.554944s,5.4060次運行/秒,5.4060次斷言/秒。 /usr/local/rvm/gems/ruby-2.3.0/gems/railties-5.0.1/lib/rails/test_unit/minitest_plugin.rb:9:in aggregated_results': wrong number of arguments (given 1, expected 0) (ArgumentError) from /usr/local/rvm/gems/ruby-2.3.0/gems/minitest-5.10.2/lib/minitest.rb:597:in從/ usr/local/rvm/gems報告' /ruby-2.3.0/gems/minitest-reporters-1.1.9/lib/minitest/minitest_reporter_plugin.rb:26:in each' from /usr/local/rvm/gems/ruby-2.3.0/gems/minitest-reporters-1.1.9/lib/minitest/minitest_reporter_plugin.rb:26:in從/usr/local/rvm/gems/ruby-2.3.0/gems/報告' minitest-5.10.2/lib/minitest.rb:687:來自/usr/local/rvm/gems/ruby-2.3.0/gems/minitest-5.10.2/lib/minitest.rb:141的each' from /usr/local/rvm/gems/ruby-2.3.0/gems/minitest-5.10.2/lib/minitest.rb:687:in報告' :run' from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-5.0.1/lib/rails/test_unit/minitest_plugin.rb:73:in從/usr/local/rvm/gems/ruby-2.3.0/gems/minitest-5.10.2/lib/minitest.rb:63:in運行「 」,從/ usr/local/rvm運行「 fork」 /gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/application.rb:161:in serve' from /usr/local/rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/application.rb:131:in block in run' from /usr/local/rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/application.rb:125:in loop' from /usr/local/rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/application.rb:125:in從/ usr/local/rvm/gems/ruby​​運行' -2.3.0/gems/spring-1.7.2/lib/spring/application/boot.rb:19:<top (required)>' from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in需要從/usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/獲得' 2.3.0/ruby​​gems/core_ext/kernel_require.rb:55:in require' from -e:1:in're

回答

0

Ugg剛發現這個問題已經在其他地方回答了。
顯然Minitest Gem文件中存在一個錯誤。

我將下面的代碼添加到test/test_helper.rb文件來解決它。不過,我很確定還有其他方法可以解決它。

Minitest :: Reporters.use!

相關問題