Sha256: f0a9e94db61569acb214b952036dac2c67cbe1d43a27f332d93a8a32ad14a2b9
Contents?: true
Size: 979 Bytes
Versions: 4
Compression:
Stored size: 979 Bytes
Contents
# ------------------------------------------------------------ # SimpleCov if ENV['COVERAGE'] require 'simplecov' spec_root = File.realpath(__dir__) spec_group_re = %r{(?<=^#{spec_root}/)[^/]+(?=/)} RSpec.configure do |config| config.before do |example| abs_path = File.realpath(example.metadata[:absolute_file_path]) match_data = spec_group_re.match(abs_path) raise ArgumentError, "Unable to determine group for example at #{abs_path}" unless match_data spec_group = match_data[0] SimpleCov.command_name(spec_group) SimpleCov.coverage_dir("artifacts/simplecov/#{spec_group}") end end end # ------------------------------------------------------------ # RSpec RSpec.configure do |config| config.color = true config.tty = true config.formatter = :documentation config.mock_with :rspec do |mocks| mocks.verify_partial_doubles = true end config.shared_context_metadata_behavior = :apply_to_host_groups end
Version data entries
4 entries across 4 versions & 1 rubygems