Skip to content

Instantly share code, notes, and snippets.

@motemen
Last active December 24, 2015 01:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save motemen/6723976 to your computer and use it in GitHub Desktop.
Save motemen/6723976 to your computer and use it in GitHub Desktop.
SimpleCov and multiple loads
if $flag
p :true
else
p :false
end
require 'simplecov'
SimpleCov.start
2.times do
$flag = !$flag
load './01_ex.rb'
end
:true
:false
SimpleCov failed to recognize the test framework and/or suite used. Please specify manually using SimpleCov.command_name 'Unit Tests'.
Coverage report generated for Unknown Test Framework to /Users/motemen/tmp/ruby-Coverage-multiple-loads/coverage. 2 / 3 LOC (66.67%) covered.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment