plataformatec/devise — Issue #1657: devise test integration problem
Author: chebyte
Created: 2012-02-16 16:45:29+00:00
State: open

hi there I have a problem, I made a simple test integration

require File.expand_path("../../helper/test_integration_helper", __FILE__)

class AdvisorsTest < ActionDispatch::IntegrationTest
setup do
@user = Factory(:user)
sign_in(@user)
end

test 'shows users' do
visit "/users"
end
end

the problem is when the test has the class ActionDispatch::IntegrationTest the test throws

NoMethodError: undefined method `env' for nil:NilClass

but when I add the class

ActionController::TestCase,

the test throws the same error but after add

class ActionController::TestCase
include Devise::TestHelpers
end

the test works ok, but I want to use integration class cause this is an integration test

anyone knows why is this?