-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Labels
Milestone
Description
Given the file my_model.rb:
class MyModel
class_eval <<-EOT, __FILE__, __LINE__
def a
foo
end
def b
bar
end
EOT
endand the following code to measure coverage in coverage_example.rb:
file = File.expand_path('my_model.rb', File.dirname(__FILE__))
puts File.read(file).split("\n").size
require 'coverage'
Coverage.start
require file.chomp('.rb')
puts Coverage.result[file].sizeRun with jruby 1.7.6 and debug enabled, the output is:
$ jruby --debug coverage_example.rb
11
15
$ I would expect the numbers to be the same, possibly the last to be smaller than the first.
The discrepancy trigger very noisy warning messages when measuring coverage, for example using simplecov.
What could cause the difference?
Reactions are currently unavailable