Skip to content

Commit

Permalink
Fix coverage issues
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez committed Jan 7, 2018
1 parent c0856ae commit 49d5628
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test/support/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,14 @@ def run_program(env, cmd, input = "")
#
def run_byebug(*args, input: "")
caller_method = Thread.current.backtrace_locations[2].label
cmd = [*binstub, "-r", "simplecov", *args]
cmd = [*binstub, *args]
byebug_dir = File.absolute_path(File.join("..", "..", "lib"), __dir__)
env = {
"MINITEST_TEST" => caller_method,
"RUBYOPT" => "-r simplecov -I #{byebug_dir}"
}

run_program({ "MINITEST_TEST" => caller_method }, cmd, input)
run_program(env, cmd, input)
end

#
Expand All @@ -251,8 +256,7 @@ def binstub
cmd = "exe/byebug"
return [cmd] unless Gem.win_platform?

byebug_dir = File.absolute_path(File.join("..", "..", "lib"), __dir__)
[RbConfig.ruby, "-I", byebug_dir, cmd]
[RbConfig.ruby, cmd]
end
end
end

0 comments on commit 49d5628

Please sign in to comment.