spec/spec_helper.rb in intranet-pictures-0.0.0 vs spec/spec_helper.rb in intranet-pictures-1.0.0
- old
+ new
@@ -41,9 +41,13 @@
$LOAD_PATH << File.absolute_path(File.join('..', 'lib'), __dir__)
# Load and start SimpleCov to gather code coverage information
unless config.files_to_run.one?
require 'simplecov'
- SimpleCov.add_filter 'spec' # exclude 'spec' folder from coverage
- SimpleCov.start
+ SimpleCov.start do
+ enable_coverage :branch # measure branches coverage
+ primary_coverage :branch
+ minimum_coverage line: 100, branch: 100 # minimal coverage rate to succeed
+ add_filter 'spec' # exclude 'spec' folder from coverage
+ end
end
end