diff --git a/.gitignore b/.gitignore index 1b71c6b..f3dcde2 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *.rbc .bundle .config +.coverage .yardoc Gemfile.lock InstalledFiles diff --git a/.travis.yml b/.travis.yml index 92bce14..8cf045d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,12 @@ matrix: - gem install bundler script: bundle exec rake rubocop # ONLY lint once, first - rvm: 2.3.5 + before_script: + - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter + - chmod +x ./cc-test-reporter + - ./cc-test-reporter before-build + after_script: + - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT - rvm: 2.4.6 - rvm: 2.5.5 - rvm: 2.6.3 diff --git a/pundit.gemspec b/pundit.gemspec index 677b9c4..41e68e0 100644 --- a/pundit.gemspec +++ b/pundit.gemspec @@ -27,5 +27,6 @@ Gem::Specification.new do |gem| gem.add_development_dependency "rake" gem.add_development_dependency "rspec", ">= 3.0.0" gem.add_development_dependency "rubocop", "0.74.0" + gem.add_development_dependency "simplecov", ">= 0.17.0" gem.add_development_dependency "yard" end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 257796c..8fc39db 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,5 +1,10 @@ # frozen_string_literal: true +require "simplecov" +SimpleCov.start do + add_filter "/spec/" +end + require "pundit" require "pundit/rspec"