1
0
Fork 0

Configure SimpleCov

This commit is contained in:
Alex Kotov 2018-12-09 04:46:40 +05:00
parent be4d382dd0
commit 627bc0552a
No known key found for this signature in database
GPG Key ID: 4E831250F47DE154
2 changed files with 26 additions and 2 deletions

View File

@ -8,8 +8,14 @@ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
])
SimpleCov.start 'rails' do
add_group 'Channels', '/app/channels/'
add_group 'Channels', '/app/channels/'
add_group 'Interactors', '/app/interactors/'
add_group 'Policies', '/app/policies/'
add_filter '/app/previews/'
add_filter '/factories/'
add_filter '/features/'
add_filter '/lib/templates/'
add_filter '/spec/'
add_filter '/vendor/'
end

View File

@ -3,4 +3,22 @@
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
require 'bundler/setup' # Set up gems listed in the Gemfile.
require 'bootsnap/setup' # Speed up boot time by caching expensive operations.
require 'bootsnap'
cache_dir = File.join(File.expand_path('..', __dir__), 'tmp', 'cache')
env = ENV['RAILS_ENV'] || ENV['RACK_ENV'] || ENV['ENV']
development_mode = ['', nil, 'development'].include?(env)
test_mode = env == 'test'
Bootsnap.setup(
cache_dir: cache_dir,
development_mode: development_mode,
load_path_cache: true,
autoload_paths_cache: true,
disable_trace: false,
compile_cache_iseq: test_mode,
compile_cache_yaml: true,
)