Я пытаюсь заставить Capybara работать с рельсами 3 (и тестовым модулем), но когда я пытаюсь запустить rake test:integration
, я получаю ошибку: ArgumentError: @request must be an ActionDispatch::Request
Тест :
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
Я не совсем уверен, что происходит не так ...