Skip to content

Instantly share code, notes, and snippets.

@fatmcgav
Created June 7, 2014 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fatmcgav/67544bf17f3e5a8ad32c to your computer and use it in GitHub Desktop.
Save fatmcgav/67544bf17f3e5a8ad32c to your computer and use it in GitHub Desktop.
Simplecov files
#!/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
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