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 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
require 'rspec-puppet/rake_task'
desc "Validate manifests, templates, and ruby files"
task :validate do
Dir['manifests/**/*.pp'].each do |manifest|
sh "puppet parser validate --noop #{manifest}"
end
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"
begin
if Gem::Specification::find_by_name('puppet-lint')
require 'puppet-lint/tasks/puppet-lint'
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "vendor/**/*.pp"]
task :default => [:rspec, :lint]
end
rescue Gem::LoadError
task :default => :rspec
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