merged/test/test_helper.rb

24 lines
678 B
Ruby
Raw Normal View History

# Configure Rails Environment
ENV["RAILS_ENV"] = "test"
require_relative "../test/dummy/config/environment"
require "rails/test_help"
2022-12-22 20:27:28 +01:00
require 'capybara/rails'
require 'capybara/minitest'
require "devise"
require "devise/test/integration_helpers"
2022-12-22 20:27:28 +01:00
class ActionDispatch::IntegrationTest
#include Devise::Test::IntegrationHelpers
#include FactoryBot::Syntax::Methods
# Make the Capybara DSL available in all integration tests
include Capybara::DSL
include Capybara::Minitest::Assertions #### THIS LINE changes minitest assert_select #####
# Reset sessions and driver between tests
teardown do
Capybara.reset_sessions!
Capybara.use_default_driver
end
end