1
0
Fork 0
mirror of https://github.com/thoughtbot/factory_bot.git synced 2022-11-09 11:43:51 -05:00
thoughtbot--factory_bot/spec/spec_helper.rb

37 lines
890 B
Ruby
Raw Normal View History

require "rspec"
require "rspec/its"
2009-04-11 11:27:23 -04:00
2012-03-09 16:14:06 -05:00
require "simplecov"
require "factory_bot"
2010-11-11 16:33:45 -05:00
if RUBY_ENGINE == "jruby"
# Workaround for issue in I18n/JRuby combo.
# See https://github.com/jruby/jruby/issues/6547 and
# https://github.com/ruby-i18n/i18n/issues/555
require "i18n/backend"
require "i18n/backend/simple"
end
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
config.include DeclarationMatchers
config.before do
FactoryBot.reload
end
2018-05-21 11:25:03 -04:00
config.order = :random
Kernel.srand config.seed
config.example_status_persistence_file_path = "tmp/rspec_examples.txt"
2009-04-11 11:27:23 -04:00
end