2020-12-22 14:33:53 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-01-11 11:10:12 +01:00
|
|
|
require 'simplecov'
|
2019-01-04 10:50:01 +01:00
|
|
|
|
|
|
|
SimpleCov.start do
|
|
|
|
add_filter '/spec/'
|
|
|
|
end
|
2018-01-11 11:10:12 +01:00
|
|
|
|
2018-12-28 16:28:21 +01:00
|
|
|
if ENV['CI'] == 'true'
|
|
|
|
require 'codecov'
|
|
|
|
SimpleCov.formatter = SimpleCov::Formatter::Codecov
|
|
|
|
end
|
|
|
|
|
2017-07-05 16:23:11 +02:00
|
|
|
require 'bundler/setup'
|
|
|
|
require 'colorls'
|
|
|
|
|
2020-12-22 14:33:53 +01:00
|
|
|
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].sort.each { |file| require file }
|
2017-07-10 13:13:39 +02:00
|
|
|
|
2018-06-26 23:14:50 +02:00
|
|
|
# disable rainbow globally to ease checking expected output
|
|
|
|
Rainbow.enabled = false
|
|
|
|
|
2017-07-05 16:23:11 +02:00
|
|
|
RSpec.configure do |config|
|
|
|
|
# Enable flags like --only-failures and --next-failure
|
|
|
|
config.example_status_persistence_file_path = '.rspec_status'
|
|
|
|
|
|
|
|
# Disable RSpec exposing methods globally on `Module` and `main`
|
|
|
|
config.disable_monkey_patching!
|
|
|
|
|
|
|
|
config.expect_with :rspec do |c|
|
|
|
|
c.syntax = :expect
|
|
|
|
end
|
|
|
|
end
|