Skip to content

Commit

Permalink
add actionable coverage reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
grosser committed Mar 17, 2018
1 parent c727373 commit b2a49cd
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Gem::Specification.new do |gem|
gem.add_development_dependency 'appraisal'
gem.add_development_dependency 'rails', '>= 4.0', '< 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
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
require "spec_helper"

SingleCov.covered! uncovered: 3 # 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
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
require "spec_helper"

SingleCov.covered! uncovered: 1 # not testing proxy_respond_to? hack

describe Audited::Auditor do

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

SingleCov.covered!

class AuditsController < ActionController::Base
before_action :populate_user

Expand Down
3 changes: 3 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
ENV['RAILS_ENV'] = 'test'
require 'bundler/setup'
require 'single_cov'
SingleCov.setup :rspec

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

0 comments on commit b2a49cd

Please sign in to comment.