From bf7f5f93fc1269fe1a8a1c6b7cc435d24382de18 Mon Sep 17 00:00:00 2001 From: Nate Riffe Date: Sun, 14 Dec 2014 07:13:39 -0600 Subject: [PATCH] 0 Examples, 0 Failures --- Gemfile | 1 + Rakefile | 24 +++++++++++++++--------- spec/spec_helper.rb | 6 ++++++ 3 files changed, 22 insertions(+), 9 deletions(-) create mode 100644 spec/spec_helper.rb diff --git a/Gemfile b/Gemfile index ce5fece..c7bd184 100644 --- a/Gemfile +++ b/Gemfile @@ -9,3 +9,4 @@ end gem 'rake' gem 'puppet', puppetversion gem 'puppet-lint' +gem 'rspec-puppet' diff --git a/Rakefile b/Rakefile index 4975ab6..66b07a6 100644 --- a/Rakefile +++ b/Rakefile @@ -1,15 +1,21 @@ +# ex: syntax=ruby ts=2 ts=2 si et require 'puppet-lint/tasks/puppet-lint' +require 'rspec/core/rake_task' + +RSpec::Core::RakeTask.new :spec do |t| + t.pattern = 'spec/*/*_spec.rb' +end Rake::Task[:lint].clear PuppetLint::RakeTask.new :lint do |config| - config.fail_on_warnings - config.ignore_paths = [ 'pkg/**/*.pp' ] - config.disable_checks = [ - '80chars', - 'class_parameter_defaults', - 'documentation', - 'autoloader_layout' - ] + config.fail_on_warnings + config.ignore_paths = [ 'pkg/**/*', 'spec/**/*' ] + config.disable_checks = [ + '80chars', + 'class_parameter_defaults', + 'documentation', + 'autoloader_layout' + ] end -task :default => [ :lint ] +task :default => [ :spec, :lint ] diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100644 index 0000000..5e0f6b1 --- /dev/null +++ b/spec/spec_helper.rb @@ -0,0 +1,6 @@ +require 'rspec-puppet' + +RSpec.configure do |c| + c.module_path = File.expand(File.join(__FILE__, '..', 'fixtures', 'modules')) + c.manifest_dir = File.expand(File.join(__FILE__, '..', 'fixtures', 'manifests')) +end