2016-10-11 21:03:37 -04:00
|
|
|
# frozen_string_literal: true
|
2018-11-10 17:54:07 -05:00
|
|
|
|
2011-02-05 08:32:10 -05:00
|
|
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2016-11-19 02:51:21 -05:00
|
|
|
$LOAD_PATH.unshift(File.join(Gem.loaded_specs['kaminari-core'].gem_dir, 'test'))
|
2011-02-05 08:32:10 -05:00
|
|
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
2012-05-17 09:06:45 -04:00
|
|
|
|
2017-05-30 17:30:06 -04:00
|
|
|
ENV['RAILS_ENV'] ||= 'test'
|
2017-06-02 06:23:37 -04:00
|
|
|
ENV['DB'] ||= 'sqlite3'
|
2017-05-30 17:30:06 -04:00
|
|
|
|
2016-10-24 10:06:06 -04:00
|
|
|
require 'rails'
|
2016-10-24 10:21:00 -04:00
|
|
|
require 'active_record'
|
2012-05-22 17:52:50 -04:00
|
|
|
|
2012-05-17 09:06:45 -04:00
|
|
|
require 'bundler/setup'
|
|
|
|
Bundler.require
|
|
|
|
|
2012-05-20 10:30:19 -04:00
|
|
|
# Simulate a gem providing a subclass of ActiveRecord::Base before the Railtie is loaded.
|
2016-10-24 10:07:03 -04:00
|
|
|
require 'fake_gem'
|
2012-05-20 10:30:19 -04:00
|
|
|
|
2016-10-24 10:07:31 -04:00
|
|
|
require 'fake_app/rails_app'
|
2016-11-19 02:51:21 -05:00
|
|
|
require 'test/unit/rails/test_help'
|
2011-02-05 08:54:09 -05:00
|
|
|
|
2011-02-05 08:32:10 -05:00
|
|
|
# Requires supporting files with custom matchers and macros, etc,
|
|
|
|
# in ./support/ and its subdirectories.
|
2016-11-19 02:51:21 -05:00
|
|
|
Dir["#{File.join(Gem.loaded_specs['kaminari-core'].gem_dir, 'test')}/support/**/*.rb"].each {|f| require f}
|