diff --git a/Gemfile b/Gemfile index 28f2420..01ebedf 100644 --- a/Gemfile +++ b/Gemfile @@ -6,3 +6,7 @@ source 'http://rubygems.org' # Bundler will treat runtime dependencies like base dependencies, and # development dependencies will be added by default to the :development group. gemspec + +group :test do + gem 'codecov', require: false +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 8eb3e7b..1e8937b 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,5 +1,13 @@ # frozen_string_literal: true +require 'simplecov' +SimpleCov.start + +if ENV.fetch('CI', '') == 'true' + require 'codecov' + SimpleCov.formatter = SimpleCov::Formatter::Codecov +end + require 'shoulda-matchers' RSpec.configure do |config|