1
0
Fork 0
mirror of https://github.com/kaminari/kaminari.git synced 2022-11-09 13:44:37 -05:00
kaminari--kaminari/test/test_helper.rb

24 lines
747 B
Ruby
Raw Normal View History

2016-10-11 21:03:37 -04:00
# frozen_string_literal: true
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'
require 'active_record'
2012-05-22 17:52:50 -04:00
2012-05-17 09:06:45 -04:00
require 'bundler/setup'
Bundler.require
# Simulate a gem providing a subclass of ActiveRecord::Base before the Railtie is loaded.
require 'fake_gem'
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}