Skip to content

Commit

Permalink
Switched to Simplecov.track_files to know about files that contain on…
Browse files Browse the repository at this point in the history
…ly untested code

http://www.rubydoc.info/gems/simplecov/SimpleCov/Configuration#track_files-instance_method

Previously we implemented this ourselves by loading all
files but that produced false negatives for code that called
a method without requiring its file.
  • Loading branch information
jreidinger committed Jan 10, 2017
1 parent 99b5de2 commit be92f74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test_helper.rb
Expand Up @@ -23,9 +23,9 @@
add_filter "/test/"
end

# for coverage we need to load all ruby files
src_location = File.expand_path("../../src", __FILE__)
Dir["#{src_location}/{module,lib}/**/*.rb"].each { |f| require_relative f }
# track all ruby files under src
SimpleCov.track_files("#{src_location}/**/*.rb")

# use coveralls for on-line code coverage reporting at Travis CI
if ENV["TRAVIS"]
Expand Down

0 comments on commit be92f74

Please sign in to comment.