请帮忙:
我想用 minitest 用户应该。
这是我得到的例外:
NoMethodError: undefined method `run_teardown_hooks' for #<#<Class:0x007fd42ed95490>:0x007fd42ed00c78>
/Users/boti/.rvm/gems/ruby-1.9.2-p180@search_server/gems/mocha-0.10.5/lib/mocha/integration/mini_test/version_230_to_262.rb:39:in `run'
/Users/boti/.rvm/gems/ruby-1.9.2-p180@search_server/gems/activesupport-3.2.11/lib/active_support/testing/setup_and_teardown.rb:36:in `block in run'
/Users/boti/.rvm/gems/ruby-1.9.2-p180@search_server/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:425:in `_run__1339649173504478165__setup__555511959301366683__callbacks'
/Users/boti/.rvm/gems/ruby-1.9.2-p180@search_server/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:405:in `__run_callback'
/Users/boti/.rvm/gems/ruby-1.9.2-p180@search_server/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:385:in `_run_setup_callbacks'
/Users/boti/.rvm/gems/ruby-1.9.2-p180@search_server/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:81:in `run_callbacks'
/Users/boti/.rvm/gems/ruby-1.9.2-p180@search_server/gems/activesupport-3.2.11/lib/active_support/testing/setup_and_teardown.rb:35:in `run'
这是我的gemfile:
gem 'minitest'
gem 'minitest-should_syntax'
gem 'miniskirt'
gem 'rack-livereload'
gem 'guard'
gem 'guard-minitest'
gem 'guard-bundler'
gem 'guard-livereload'
gem 'annotate', ">=2.5.0"
gem 'guard-annotate'
gem "rb-fsevent"
gem 'database_cleaner'
gem "minitest-rails-shoulda"
gem 'sqlite3', :require => 'sqlite3'
这是我的 test_helper:
ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require 'minitest/autorun'
require 'minitest/should_syntax'
require 'factories/factories'
class ActionController::TestCase
include Devise::TestHelpers
end