From 6400f5bc6d739d8f4c0b72a441e1bf508e833ac5 Mon Sep 17 00:00:00 2001 From: Anil Maurya Date: Sun, 1 Sep 2019 20:08:48 +0530 Subject: [PATCH] Setup codecov --- aasm.gemspec | 2 ++ spec/spec_helper.rb | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/aasm.gemspec b/aasm.gemspec index b29fa72..4aa0745 100644 --- a/aasm.gemspec +++ b/aasm.gemspec @@ -23,6 +23,8 @@ Gem::Specification.new do |s| s.add_development_dependency 'rspec', ">= 3" s.add_development_dependency 'generator_spec' s.add_development_dependency 'appraisal' + s.add_development_dependency "simplecov" + s.add_development_dependency "codecov", ">= 0.1.10" # debugging # s.add_development_dependency 'debugger' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index a9aadf7..ed2e164 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,13 @@ +require 'simplecov' +SimpleCov.start do + add_filter '/spec/' +end + +if ENV['CI'] == 'true' + require 'codecov' + SimpleCov.formatter = SimpleCov::Formatter::Codecov +end + $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__))) $LOAD_PATH.unshift(File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))) require 'aasm'