2016-10-12 01:03:37 +00:00
|
|
|
# frozen_string_literal: true
|
2011-02-05 13:32:10 +00:00
|
|
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2016-10-04 21:32:53 +00:00
|
|
|
$LOAD_PATH.unshift(File.join(Gem.loaded_specs['kaminari-core'].gem_dir, 'spec'))
|
2011-02-05 13:32:10 +00:00
|
|
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
2012-05-17 13:06:45 +00:00
|
|
|
|
2016-10-24 14:06:06 +00:00
|
|
|
require 'rails'
|
2016-10-24 14:21:00 +00:00
|
|
|
require 'active_record'
|
2012-05-22 21:52:50 +00:00
|
|
|
|
2012-05-17 13:06:45 +00:00
|
|
|
require 'bundler/setup'
|
|
|
|
Bundler.require
|
|
|
|
|
2012-11-26 13:43:59 +00:00
|
|
|
require 'capybara/rspec'
|
2011-04-02 05:27:28 +00:00
|
|
|
require 'database_cleaner'
|
2012-05-20 14:30:19 +00:00
|
|
|
|
|
|
|
# Simulate a gem providing a subclass of ActiveRecord::Base before the Railtie is loaded.
|
2016-10-24 14:07:03 +00:00
|
|
|
require 'fake_gem'
|
2012-05-20 14:30:19 +00:00
|
|
|
|
2016-10-24 14:07:31 +00:00
|
|
|
require 'fake_app/rails_app'
|
2012-05-22 21:52:50 +00:00
|
|
|
|
2016-10-24 14:07:31 +00:00
|
|
|
require 'rspec/rails'
|
2011-02-05 13:54:09 +00:00
|
|
|
|
2011-02-05 13:32:10 +00:00
|
|
|
# Requires supporting files with custom matchers and macros, etc,
|
|
|
|
# in ./support/ and its subdirectories.
|
2016-10-05 13:23:18 +00:00
|
|
|
Dir["#{File.join(Gem.loaded_specs['kaminari-core'].gem_dir, 'spec')}/support/**/*.rb"].each {|f| require f}
|
2011-02-05 13:32:10 +00:00
|
|
|
|
|
|
|
RSpec.configure do |config|
|
2011-02-05 13:54:09 +00:00
|
|
|
config.mock_with :rr
|
2011-02-05 13:32:10 +00:00
|
|
|
end
|