6
我試圖讓水豚與軌道3(和測試單元),但工作的時候我嘗試運行rake test:integration
我得到一個錯誤:ArgumentError: @request must be an ActionDispatch::Request
Rails 3的水豚錯誤
測試:
require 'integration_test_helper'
class UserNotesTest < ActionDispatch::IntegrationTest
test "User should login" do
user = Factory.create(:user)
visit '/login'
assert_response :success
fill_in 'user_email', :with => user.email
fill_in 'user_password', :with => user.password
click_button 'Sign in'
assert_redirect_to notes_path
end
end
integration_test_helper:
require 'test_helper'
require 'capybara/rails'
module ActionDispatch
class IntegrationTest
include Capybara
end
end
我真的不知道WH ats going wrong ...
您的問題官方解釋:https://github.com/jnicklas/capybara/issues/240 – user664833 2012-07-22 22:53:15