Sha256: 75dad012c0b858f739b7c8ed5ed05a70601bc8bed7b6da114d352da36400db35
Contents?: true
Size: 1.43 KB
Versions: 2
Compression:
Stored size: 1.43 KB
Contents
# frozen_string_literal: true ENV['RAILS_ENV'] = 'test' require File.expand_path('../test/dummy/config/environment.rb', __dir__) ActiveRecord::Migrator.migrations_paths = [File.expand_path('../test/dummy/db/migrate', __dir__)] ActiveRecord::Migrator.migrations_paths << File.expand_path('../db/migrate', __dir__) require 'rails/test_help' require 'capybara/rails' require 'database_cleaner' Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } if ActiveSupport::TestCase.respond_to?(:fixture_path=) ActiveSupport::TestCase.fixture_path = File.expand_path('fixtures', __dir__) ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path ActiveSupport::TestCase.fixtures :all end Capybara.register_driver :chrome do |app| Capybara::Selenium::Driver.new app, browser: :chrome end Capybara.javascript_driver = :chrome Capybara.current_driver = Capybara.javascript_driver Capybara.default_max_wait_time = 5 Capybara.server = :puma # Filter out Minitest backtrace while allowing backtrace from other libraries to be shown. Minitest.backtrace_filter = Minitest::BacktraceFilter.new DatabaseCleaner.strategy = :truncation, { except: %w[ar_internal_metadata] } class ActiveSupport::TestCase self.use_transactional_tests = false fixtures :all def setup DatabaseCleaner.start end def teardown DatabaseCleaner.clean end end class IT < ActionDispatch::IntegrationTest include Capybara::DSL end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
loco-rails-3.0.5 | test/test_helper.rb |
loco-rails-3.0.4 | test/test_helper.rb |