Files
metasploit-gs/features/support/simplecov_setup.rb
T

17 lines
472 B
Ruby
Raw Normal View History

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