How do you setup a request object for integration tests in Capybara?-Collection of common programming errors
request
is not available in capybara but I am trying to test login via facebook/twitter. How do I create a helper to be able to use request
?
Error: NameError: undefined local variable or method 'request'
login_integration_tests.rb:
before do
OmniAuth.config.mock_auth[:facebook] = {
'provider' => 'facebook',
'uid' => '123545'
}
request.env["omniauth.auth"] = OmniAuth.config.mock_auth[:facebook] # error here
end
Thanks for your help!
Originally posted 2013-11-09 23:10:38.