mirror of
https://github.com/thoughtbot/factory_bot.git
synced 2022-11-09 11:43:51 -05:00
131d7791c5
* Remove obsolete gemfile * Work around issue with the combination of I18n and JRuby See https://github.com/jruby/jruby/issues/6547 and https://github.com/ruby-i18n/i18n/issues/555 * Use correct released versions of activerecord-jdbcsqlite3-adapter * Require CI to pass on JRuby again * Build on latest JRuby 9.2 version
36 lines
890 B
Ruby
36 lines
890 B
Ruby
require "rspec"
|
|
require "rspec/its"
|
|
|
|
require "simplecov"
|
|
|
|
require "factory_bot"
|
|
|
|
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
|
|
|
|
Dir["spec/support/**/*.rb"].each { |f| require File.expand_path(f) }
|
|
|
|
RSpec.configure do |config|
|
|
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
|
|
|
|
config.include DeclarationMatchers
|
|
|
|
config.before do
|
|
FactoryBot.reload
|
|
end
|
|
|
|
config.order = :random
|
|
Kernel.srand config.seed
|
|
|
|
config.example_status_persistence_file_path = "tmp/rspec_examples.txt"
|
|
end
|