-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathspec_helper.rb
55 lines (41 loc) · 1.3 KB
/
spec_helper.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# frozen_string_literal: true
require "bundler/setup"
require "simplecov"
require "simplecov-lcov"
SimpleCov::Formatter::LcovFormatter.config do |c|
c.report_with_single_file = true
c.lcov_file_name = "lcov.info"
c.output_directory = "coverage"
end
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
SimpleCov::Formatter::HTMLFormatter,
SimpleCov::Formatter::LcovFormatter,
])
SimpleCov.enable_coverage(:branch)
SimpleCov.enable_coverage(:line)
SimpleCov.add_filter "spec"
SimpleCov.start
# Required for tainbox :(
require "active_support/deprecation"
require "active_support/deprecator"
require "rabbit_messaging"
require "rspec/its"
require "pry"
require "ipaddr"
require_relative "../environments/development"
require_relative "support/spec_support"
RSpec.configure do |config|
config.expect_with :rspec do |expectations|
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
end
config.filter_run_when_matching :focus
config.mock_with :rspec do |mocks|
mocks.verify_partial_doubles = true
end
config.shared_context_metadata_behavior = :apply_to_host_groups
config.disable_monkey_patching!
config.default_formatter = "doc" if config.files_to_run.one?
config.expose_dsl_globally = true
config.order = :random
Kernel.srand(config.seed)
end