Sha256: fc453c41909f97cc9d1214aa11f5cf882cd39333be56c47683542b97d5d763c8

Contents?: true

Size: 1.21 KB

Versions: 1

Compression:

Stored size: 1.21 KB

Contents

# Configure Rails Environment
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"

# Filter out Minitest backtrace while allowing backtrace from other libraries
# to be shown.
Minitest.backtrace_filter = Minitest::BacktraceFilter.new

# Load fixtures from the engine
if ActiveSupport::TestCase.respond_to?(:fixture_path=)
  ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
end

require 'capybara/apparition'
require 'capybara/rails'
require "timeout"

SANDBOX_PATH = Pathname.new(File.expand_path("sandbox", __dir__))
SANDBOX_PATH.each_child do |screenshot|
  next if screenshot.basename.to_s == '.gitkeep'
  screenshot.delete
end

class ActionDispatch::IntegrationTest
  include Capybara::DSL
  Capybara.default_driver = :apparition

  def teardown
    super
    Capybara.reset_sessions!    # Forget the (simulated) browser state
    Capybara.use_default_driver # Revert Capybara.current_driver to Capybara.default_driver
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pdfjs_viewer-rails-0.3.2 test/test_helper.rb