Created
June 7, 2014 21:02
-
-
Save fatmcgav/67544bf17f3e5a8ad32c to your computer and use it in GitHub Desktop.
Simplecov files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
source "https://rubygems.org" | |
if ENV.key?('PUPPET_VERSION') | |
puppetversion = ENV['PUPPET_VERSION'] | |
else | |
puppetversion = ['>= 2.7'] | |
end | |
gem 'rake' | |
group :test do | |
gem 'puppet', puppetversion | |
gem 'rspec-puppet', '>=1.0.1' | |
gem 'puppetlabs_spec_helper' | |
gem 'puppet-lint' | |
gem 'puppet-syntax' | |
gem 'librarian-puppet' | |
gem 'simplecov', :require => false, :platforms => [:ruby_19, :ruby_20] | |
if ENV.key?('TEAMCITY_VERSION') | |
gem 'simplecov-teamcity-summary', :require => false, :platforms => [:ruby_19, :ruby_20] | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'puppetlabs_spec_helper/module_spec_helper' | |
Dir[File.join(File.dirname(__FILE__), 'support', '*.rb')].each do |support_file| | |
require support_file | |
end | |
class Object | |
alias :must :should | |
alias :must_not :should_not | |
end | |
# Simplecov for Teamcity | |
begin | |
require 'simplecov' | |
SimpleCov.start do | |
add_filter '/spec/' | |
add_filter '/lib/puppet/util/network_device/netapp/Na' | |
at_exit do | |
SimpleCov::Formatter::TeamcitySummaryFormatter.new.format(SimpleCov.result) if ENV['TEAMCITY_VERSION'] | |
end | |
end | |
rescue Exception => e | |
warn "Simplecov disabled" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment