Sha256: c3fbb8851912003b0634c0a8f0c240ed8a7feb75e7609e68eec511135d3f9f55

Contents?: true

Size: 1.14 KB

Versions: 1

Compression:

Stored size: 1.14 KB

Contents

# frozen_string_literal: true

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))

ENV['RAILS_ENV'] = 'development'

# load Rails first
require 'rails'
require 'jquery-rails'
require 'erd'
require 'fake_app/fake_app'
require 'test/unit/rails/test_help'
Bundler.require
require 'capybara'
require 'selenium/webdriver'

begin
  require "action_dispatch/system_test_case"
rescue LoadError
  Capybara.register_driver :chrome do |app|
    options = Selenium::WebDriver::Chrome::Options.new(:args => %w[no-sandbox headless disable-gpu])
    Capybara::Selenium::Driver.new(app, :browser => :chrome, :options => options)
  end
  Capybara.javascript_driver = :chrome
else
  ActionDispatch::SystemTestCase.driven_by(:selenium, :using => :headless_chrome)
end

ActiveRecord::Migration.verbose = false
if defined? ActiveRecord::MigrationContext  # >= 5.2
  ActiveRecord::Migrator.migrations_paths = Rails.application.paths['db/migrate'].to_a
  ActiveRecord::Base.connection.migration_context.migrate
else
  ActiveRecord::Migrator.migrate(ActiveRecord::Migrator.migrations_paths.map {|p| Rails.root.join p}, nil)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
erd-0.5.0 test/test_helper.rb