我只是想测试一个尝试过的 minitest。在 Railscast 之后,我终于得到了一些工作模式,但测试运行了两次。看到一些说要进行捆绑更新的东西。这导致了我已经清除的几个问题,除了:
/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
.