kaminari--kaminari/spec/spec_helper.rb

29 lines
846 B
Ruby
Raw Normal View History

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'
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'
require 'database_cleaner'
# Simulate a gem providing a subclass of ActiveRecord::Base before the Railtie is loaded.
require 'fake_gem'
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
config.filter_run_excluding :generator_spec => true if !ENV['GENERATOR_SPEC']
2011-02-05 13:32:10 +00:00
end