Skip to content

Commit

Permalink
add actionable coverage reporting (#356)
Browse files Browse the repository at this point in the history
  • Loading branch information
grosser authored and tbrisker committed Apr 8, 2018
1 parent ed4e2ec commit 32982cb
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 2 deletions.
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -9,7 +9,6 @@
.ruby-version
.rvmrc
.yardoc
coverage/
doc/
Gemfile.lock
gemfiles/*.lock
Expand Down
1 change: 1 addition & 0 deletions audited.gemspec
Expand Up @@ -22,6 +22,7 @@ Gem::Specification.new do |gem|
gem.add_development_dependency 'appraisal'
gem.add_development_dependency 'rails', '>= 4.2', '< 5.2'
gem.add_development_dependency 'rspec-rails', '~> 3.5'
gem.add_development_dependency 'single_cov'

# JRuby support for the test ENV
if defined?(JRUBY_VERSION)
Expand Down
2 changes: 2 additions & 0 deletions spec/audited/audit_spec.rb
@@ -1,5 +1,7 @@
require "spec_helper"

SingleCov.covered! uncovered: 7 # not testing json object and collection_cache_key

describe Audited::Audit do
let(:user) { Models::ActiveRecord::User.new name: "Testing" }

Expand Down
2 changes: 2 additions & 0 deletions spec/audited/auditor_spec.rb
@@ -1,5 +1,7 @@
require "spec_helper"

SingleCov.covered! uncovered: 9 # not testing proxy_respond_to? hack / 2 methods

describe Audited::Auditor do

describe "configuration" do
Expand Down
2 changes: 2 additions & 0 deletions spec/audited/sweeper_spec.rb
@@ -1,5 +1,7 @@
require "spec_helper"

SingleCov.covered! uncovered: 3

class AuditsController < ActionController::Base
before_action :populate_user

Expand Down
4 changes: 3 additions & 1 deletion spec/spec_helper.rb
@@ -1,6 +1,8 @@
ENV['RAILS_ENV'] = 'test'
require 'bundler/setup'
require 'single_cov'
SingleCov.setup :rspec

require 'bundler'
if Bundler.definition.dependencies.map(&:name).include?('protected_attributes')
require 'protected_attributes'
end
Expand Down

0 comments on commit 32982cb

Please sign in to comment.