Skip to content

Commit

Permalink
Coverage was not tracking a number of files
Browse files Browse the repository at this point in the history
A number of underlying superclasses were not discovered by the
autoloading setup in use resulting in missing entries and a drop in
overall coverage to 76%.

This changes the the setup to ensure things like `api.rb` are covered.
  • Loading branch information
tokengeek committed Dec 20, 2024
1 parent 4b9aac6 commit bc5ac80
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
require "simplecov"

SimpleCov.start do
add_filter "/spec/"
add_filter "/config/"
add_filter "/vendor/"

track_files "{lib}/**/*.rb"

# Currently just above 75% coverage - don't make it worse
minimum_coverage 75
refuse_coverage_drop
end

LIB_DIR = File.expand_path(File.join(File.dirname(__FILE__), "..", "lib"))

$LOAD_PATH.unshift LIB_DIR unless
$LOAD_PATH.include?(LIB_DIR) || $LOAD_PATH.include?(File.expand_path(LIB_DIR))

require "simplecov"
require "brightbox_cli"
require "json"
require "tmpdir"
Expand Down Expand Up @@ -31,16 +44,6 @@

require "fog/brightbox"

SimpleCov.start do
add_filter "/spec/"
add_filter "/config/"
add_filter "/vendor/"

# Currently just above 80% coverage - don't make it worse
minimum_coverage 80
refuse_coverage_drop
end

RSpec.configure do |config|
config.include CommonHelpers
config.include ConfigHelpers
Expand Down

0 comments on commit bc5ac80

Please sign in to comment.