Skip to content

Instantly share code, notes, and snippets.

@uhlenbrock
Created September 7, 2011 17:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uhlenbrock/1201154 to your computer and use it in GitHub Desktop.
Save uhlenbrock/1201154 to your computer and use it in GitHub Desktop.
Integration Testing with Capybara & Devise
require 'test_helper'
require 'capybara/rails'
require 'devise/test_helpers'
class ActionController::IntegrationTest
include Capybara::DSL
include Warden::Test::Helpers
self.use_transactional_fixtures = false
def setup
login_as users(:admin)
end
def teardown
logout
Warden.test_reset!
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment