0
ruby類中的我的代碼是。在這裏我得到未初始化的常量ActionDispatch(NameError)在Ruby中未初始化的常量ActionDispatch(NameError)
DatabaseCleaner.strategy = :transaction
class ActionDispatch::IntegrationTest
# Make the Capybara DSL available in all integration tests
include Capybara::DSL
# Stop ActiveRecord from wrapping tests in transactions
self.use_transactional_fixtures = false
teardown do
DatabaseCleaner.clean # Truncate the database
Capybara.reset_sessions! # Forget the (simulated) browser state
Capybara.use_default_driver
end
end
這是什麼代碼?什麼版本的導軌? –
我寫這篇文章是針對黃瓜測試用例的。它在test_helper.rb 我正在使用Rails 3.1.0 –
也許粘貼你的整個test_helper.rb。你沒有用上面的代碼替換它中的所有代碼嗎? – rainkinz