Sha256: 978e40f48f6db0f9dad4f49c02a89272d89e7ee159d34ee8f9cebeaffeeb620b

Contents?: true

Size: 1.47 KB

Versions: 18

Compression:

Stored size: 1.47 KB

Contents

ENV["RAILS_ENV"] = "test"
require File.expand_path("../../test/dummy/config/environment.rb",  __FILE__)
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)]
ActiveRecord::Migrator.migrations_paths << File.expand_path('../../db/migrate', __FILE__)
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", __FILE__)
  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

class ActiveSupport::TestCase
  if Rails.version.to_f >= 5
    self.use_transactional_tests = false
  else
    self.use_transactional_fixtures = false
  end

  fixtures :all

  def setup
    DatabaseCleaner.start
  end

  def teardown
    DatabaseCleaner.clean
  end
end

class IT < ActionDispatch::IntegrationTest
  include Capybara::DSL
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
loco-rails-3.0.3 test/test_helper.rb
loco-rails-2.5.3 test/test_helper.rb
loco-rails-2.5.2 test/test_helper.rb
loco-rails-3.0.2 test/test_helper.rb
loco-rails-3.0.1 test/test_helper.rb
loco-rails-2.5.1 test/test_helper.rb
loco-rails-2.5.0 test/test_helper.rb
loco-rails-2.4.0 test/test_helper.rb
loco-rails-2.3.0 test/test_helper.rb
loco-rails-3.0.0 test/test_helper.rb
loco-rails-2.2.2 test/test_helper.rb
loco-rails-2.2.1 test/test_helper.rb
loco-rails-2.2.0 test/test_helper.rb
loco-rails-2.1.0 test/test_helper.rb
loco-rails-2.0.0 test/test_helper.rb
loco-rails-1.5.2 test/test_helper.rb
loco-rails-1.5.1 test/test_helper.rb
loco-rails-1.5.0 test/test_helper.rb