Gitlab Community Edition Instance

Skip to content
Snippets Groups Projects
Commit 398125be authored by Benedikt Wegmann's avatar Benedikt Wegmann
Browse files

rspec init

parent 1cc04ade
No related branches found
No related tags found
No related merge requests found
require 'rubygems' require 'rspec-puppet/rake_task'
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
desc "Validate manifests, templates, and ruby files" begin
task :validate do if Gem::Specification::find_by_name('puppet-lint')
Dir['manifests/**/*.pp'].each do |manifest| require 'puppet-lint/tasks/puppet-lint'
sh "puppet parser validate --noop #{manifest}" PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "vendor/**/*.pp"]
end task :default => [:rspec, :lint]
Dir['spec/**/*.rb','lib/**/*.rb'].each do |ruby_file|
sh "ruby -c #{ruby_file}" unless ruby_file =~ /spec\/fixtures/
end
Dir['templates/**/*.erb'].each do |template|
sh "erb -P -x -T '-' #{template} | ruby -c"
end end
rescue Gem::LoadError
task :default => :rspec
end end
../../../../files
\ No newline at end of file
../../../../lib
\ No newline at end of file
../../../../manifests
\ No newline at end of file
../../../../templates
\ No newline at end of file
require 'puppetlabs_spec_helper/module_spec_helper' require 'rspec-puppet/spec_helper'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment