2014-11-24 14:07:00 +00:00
|
|
|
# @note this file is loaded in env.rb to setup simplecov using RUBYOPTs for child processes
|
|
|
|
|
2014-12-05 17:58:09 +00:00
|
|
|
simplecov_command_name = ENV['SIMPLECOV_COMMAND_NAME']
|
2014-11-24 14:07:00 +00:00
|
|
|
|
2014-12-05 17:58:09 +00:00
|
|
|
# will not be set if hook does not run because `bundle install --without coverage`
|
|
|
|
if simplecov_command_name
|
|
|
|
require 'simplecov'
|
2014-11-24 14:07:00 +00:00
|
|
|
|
2014-12-05 17:58:09 +00:00
|
|
|
require 'pathname'
|
2014-11-24 14:07:00 +00:00
|
|
|
|
2014-12-05 17:58:09 +00:00
|
|
|
root = Pathname(__FILE__).expand_path.parent.parent.parent
|
|
|
|
|
|
|
|
SimpleCov.command_name(simplecov_command_name)
|
|
|
|
SimpleCov.root(root)
|
|
|
|
load root.join('.simplecov')
|
|
|
|
end
|