spec/spec_helper.rb in contracted_value-0.1.0 vs spec/spec_helper.rb in contracted_value-0.1.1
- old
+ new
@@ -1,15 +1,25 @@
# frozen_string_literal: true
-$LOAD_PATH.unshift(File.expand_path("../../lib", __FILE__))
-require "contracted_value"
-
-if ENV["TRAVIS"]
+if ENV["COVERALLS"]
require "simplecov"
- SimpleCov.start
+ require "simplecov-lcov"
- require "codecov"
- SimpleCov.formatter = SimpleCov::Formatter::Codecov
+ SimpleCov::Formatter::LcovFormatter.config do |c|
+ c.report_with_single_file = true
+ c.single_report_path = "coverage/lcov.info"
+ end
+
+ SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new(
+ [SimpleCov::Formatter::HTMLFormatter, SimpleCov::Formatter::LcovFormatter]
+ )
+
+ SimpleCov.start do
+ add_filter "spec/"
+ end
end
+
+$LOAD_PATH.unshift(File.expand_path("../../lib", __FILE__))
+require "contracted_value"
require "rspec"
require "rspec/its"