2010-11-11 16:33:45 -05:00
|
|
|
require 'rspec'
|
2015-09-11 09:16:23 -04:00
|
|
|
require 'rspec/its'
|
2009-04-11 11:27:23 -04:00
|
|
|
|
2012-03-09 16:14:06 -05:00
|
|
|
require "simplecov"
|
|
|
|
|
2017-10-20 15:20:28 -04:00
|
|
|
require 'factory_bot'
|
2011-09-02 16:22:53 -04:00
|
|
|
require "timecop"
|
2010-11-11 16:33:45 -05:00
|
|
|
|
2011-08-16 23:30:09 -04:00
|
|
|
Dir["spec/support/**/*.rb"].each { |f| require File.expand_path(f) }
|
|
|
|
|
2010-11-11 16:33:45 -05:00
|
|
|
RSpec.configure do |config|
|
2017-06-01 12:54:02 -04:00
|
|
|
config.mock_with :rspec do |mocks|
|
|
|
|
# Prevents you from mocking or stubbing a method that does not exist on a
|
|
|
|
# real object. This is generally recommended, and will default to `true` in
|
|
|
|
# RSpec 4.
|
|
|
|
mocks.verify_partial_doubles = true
|
|
|
|
end
|
2011-08-12 22:06:10 -04:00
|
|
|
|
2011-10-14 15:14:43 -04:00
|
|
|
config.include DeclarationMatchers
|
|
|
|
|
2017-06-14 08:00:47 -04:00
|
|
|
config.before do
|
2017-10-20 15:20:28 -04:00
|
|
|
FactoryBot.reload
|
2017-06-14 08:00:47 -04:00
|
|
|
end
|
|
|
|
|
2010-06-10 14:58:47 -04:00
|
|
|
config.after do
|
2012-06-22 17:53:20 -04:00
|
|
|
Timecop.return
|
2010-06-10 14:58:47 -04:00
|
|
|
end
|
2018-05-21 11:25:03 -04:00
|
|
|
|
|
|
|
config.order = :random
|
|
|
|
Kernel.srand config.seed
|
2009-04-11 11:27:23 -04:00
|
|
|
end
|