Merge branch 'feature/puppet-unit-tests' into develop

Merge in a branch that adds puppet-lint tests.
This commit is contained in:
Nick Chappell 2015-01-06 21:20:14 -08:00
commit ea681c2978
3 changed files with 26 additions and 0 deletions

1
.gitignore vendored
View file

@ -5,3 +5,4 @@ spec/fixtures/
.vagrant/
.bundle/
coverage/
.ruby-version

14
Gemfile Normal file
View file

@ -0,0 +1,14 @@
source ENV['GEM_SOURCE'] || "https://rubygems.org"
#Install the gems but don't run `require gemname` when bundler runs
#Source: http://stackoverflow.com/questions/4800721/bundler-what-does-require-false-in-a-gemfile-mean
#Source of the list of gems: https://github.com/puppetlabs/puppetlabs-ntp/blob/master/Gemfile
group :development, :unit_tests do
gem 'rake', :require => false
gem 'rspec-puppet', :require => false
gem 'puppetlabs_spec_helper', :require => false
gem 'puppet-lint', :require => false
gem 'simplecov', :require => false
gem 'puppet_facts', :require => false
gem 'json', :require => false
end

11
Rakefile Normal file
View file

@ -0,0 +1,11 @@
require 'puppet-lint/tasks/puppet-lint'
task :unit_tests => [:lint]
PuppetLint.configuration.fail_on_warnings
PuppetLint.configuration.send('relative')
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
PuppetLint.configuration.send('disable_documentation')
PuppetLint.configuration.send('disable_single_quote_string_with_variables')
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]