Skip to content

Commit

Permalink
Better coverage reports.
Browse files Browse the repository at this point in the history
  • Loading branch information
jairojunior committed Nov 7, 2016
1 parent f70e8e9 commit 2e6217d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 11 deletions.
7 changes: 3 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ source 'https://rubygems.org'

puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['= 3.7.5']

platform :ruby_19, :ruby_20 do
gem 'coveralls', :require => false
gem 'simplecov', :require => false
end
gem 'coveralls', :require => false
gem 'simplecov', :require => false
gem 'simplecov-console'
gem 'puppet-lint'
gem 'puppet', puppetversion
gem 'rspec', '>= 3.2.0'
Expand Down
28 changes: 21 additions & 7 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,16 +1,30 @@
require 'rspec-puppet'
require 'puppetlabs_spec_helper/module_spec_helper'

begin
require 'coveralls'
Coveralls.wear!
require 'coveralls'
require 'simplecov'
require 'simplecov-console'

rescue LoadError
puts 'No Coveralls support'
SimpleCov.formatters = [
SimpleCov::Formatter::HTMLFormatter,
SimpleCov::Formatter::Console,
Coveralls::SimpleCov::Formatter
]
SimpleCov.start do

add_group "Puppet Types", '/lib/puppet/type/'
add_group "Puppet Providers", '/lib/puppet/provider/'
add_group "Puppet Functions", 'lib/puppet/parser/functions/'
add_group "Puppet Extensions", 'lib/puppet_x/'
add_group "Facts", 'lib/facter'


add_filter '/spec'
add_filter '/lib/puppet_x/util/digest_auth.rb'

track_files 'lib/**/*.rb'
end

fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures'))
# include common helpers
support_path = File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec/support/*.rb'))
Dir[support_path].each { |f| require f }

Expand Down

0 comments on commit 2e6217d

Please sign in to comment.