-
Notifications
You must be signed in to change notification settings - Fork 0
/
spec_helper.rb
48 lines (37 loc) · 1.02 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
# frozen_string_literal: true
require "bundler/setup"
Bundler.require(:tools)
# This needs to be the very first thing in this file
require "simplecov"
SimpleCov.start do
enable_coverage :branch
end
require_relative "helpers"
require "kiba/extend"
require "dry/configurable/test_interface"
module Kiba
module Extend
enable_test_interface
module Marc
enable_test_interface
end
end
end
RSpec.configure do |config|
config.include Helpers
# random but deterministic test order
config.order = :random
Kernel.srand config.seed
# 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
c.include_chain_clauses_in_custom_matcher_descriptions = true
end
config.mock_with :rspec do |mocks|
mocks.verify_doubled_constant_names = true
mocks.verify_partial_doubles = true
end
end