-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathspec_helper.rb
43 lines (33 loc) · 1002 Bytes
/
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
require "bundler/setup"
require "flay"
require "tmpdir"
require "pry"
Pry.config.pager = false
Pry.config.color = false
require "cc/logger"
require "cc/engine/duplication"
Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each {|f| require f }
RSpec.configure do |config|
config.expect_with :rspec do |expectations|
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
end
config.mock_with :rspec do |mocks|
mocks.verify_partial_doubles = true
end
config.around(:example, :in_tmpdir) do |example|
Dir.mktmpdir do |directory|
@code = directory
Dir.chdir(directory) do
example.run
end
end
end
config.order = :random
config.disable_monkey_patching!
config.filter_run focus: true
config.alias_example_to :fit, focus: true
config.alias_example_to :pit, pending: true
config.run_all_when_everything_filtered = true
end
CC.logger.level = ::Logger::ERROR
CC::Parser.configure { |config| config.logger = CC.logger }