Skip to content

Instantly share code, notes, and snippets.

@minimul
Created March 23, 2020 16:29
Show Gist options
  • Save minimul/abb4b891cea8914e56472f48b5e89d97 to your computer and use it in GitHub Desktop.
Save minimul/abb4b891cea8914e56472f48b5e89d97 to your computer and use it in GitHub Desktop.
ENV['RAILS_ENV'] ||= 'test'
require_relative '../config/environment'
require 'rails/test_help'
require 'capybara/rails'
require 'capybara/minitest'
require_relative 'helpers/session'
require_relative 'helpers/screenshot'
Capybara.asset_host = 'http://127.0.0.1:3000'
INTUIT_OPEN_ID_URL = "https://openid.intuit.com/Identity-bc9a448a-70ac-410d-b525-5f1a005b958d"
class ActiveSupport::TestCase
# Run tests in parallel with specified workers
parallelize(workers: 4)
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
fixtures :all
# Add more helper methods to be used by all tests here...
end
class ActionDispatch::IntegrationTest
# Make the Capybara DSL available in all integration tests
include Capybara::DSL
# Make `assert_*` methods behave like Minitest assertions
include Capybara::Minitest::Assertions
# Reset sessions and driver between tests
teardown do
Capybara.reset_sessions!
Capybara.use_default_driver
end
include Session
include Screenshot
include Devise::Test::IntegrationHelpers
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment