0
我只是試圖進入測試一個嘗試minitest。我終於在Railscast之後得到了一些工作模式,但測試運行了兩次。看到說要做一個包更新的東西。這導致了,我只是澄清了幾個問題:rails3 minitest包更新給我register_spec_type undefined方法
/Users/me/.rvm/gems/ruby-1.9.3-p327/gems/minitest-rails-0.5.2/lib/minitest/rails.rb:34:in `<class:TestCase>': undefined method `register_spec_type' for ActionController::TestCase:Class (NoMethodError)
from /Users/salex/.rvm/gems/ruby-1.9.3-p327/gems/minitest-rails-0.5.2/lib/minitest/rails.rb:32:in `<top (required)>'
from /Users/salex/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
from /Users/salex/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/salex/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/salex/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
from /Users/salex/work/aidtdbr/test/minitest_helper.rb:5:in `<top (required)>'
...
,它指向require "minitest/rails"
線在我的MINITEST幫手
我捆
Using minitest (4.6.1)
Using minitest-matchers (1.2.0)
Using minitest-capybara (0.1.0)
Using rails (3.2.11)
Using minitest-rails (0.5.2)
Using minitest-rails-capybara (0.5.1)
我重新安裝了MINITEST幫手,只是沒有註釋幾件事
ENV["RAILS_ENV"] = "development"
require File.expand_path('../../config/environment', __FILE__)
require "minitest/autorun"
require "minitest/rails"
require "minitest/rails/capybara"
class ActiveSupport::TestCase
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
fixtures :all
# Add more helper methods to be used by all tests here...
end
這沒有不要開始作爲一個新的應用程序,所以我不知道在minitest之前什麼是搞亂,但它確實有效。我認爲我的兩次跑步是使用rake test
而不是rake minitest
。
做完之後提到上面沒有解決問題。 – 2015-05-23 15:38:10