0 Examples, 0 Failures
This commit is contained in:
parent
11fbd51d21
commit
bf7f5f93fc
1
Gemfile
1
Gemfile
@ -9,3 +9,4 @@ end
|
|||||||
gem 'rake'
|
gem 'rake'
|
||||||
gem 'puppet', puppetversion
|
gem 'puppet', puppetversion
|
||||||
gem 'puppet-lint'
|
gem 'puppet-lint'
|
||||||
|
gem 'rspec-puppet'
|
||||||
|
|||||||
24
Rakefile
24
Rakefile
@ -1,15 +1,21 @@
|
|||||||
|
# ex: syntax=ruby ts=2 ts=2 si et
|
||||||
require 'puppet-lint/tasks/puppet-lint'
|
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
|
Rake::Task[:lint].clear
|
||||||
PuppetLint::RakeTask.new :lint do |config|
|
PuppetLint::RakeTask.new :lint do |config|
|
||||||
config.fail_on_warnings
|
config.fail_on_warnings
|
||||||
config.ignore_paths = [ 'pkg/**/*.pp' ]
|
config.ignore_paths = [ 'pkg/**/*', 'spec/**/*' ]
|
||||||
config.disable_checks = [
|
config.disable_checks = [
|
||||||
'80chars',
|
'80chars',
|
||||||
'class_parameter_defaults',
|
'class_parameter_defaults',
|
||||||
'documentation',
|
'documentation',
|
||||||
'autoloader_layout'
|
'autoloader_layout'
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
task :default => [ :lint ]
|
task :default => [ :spec, :lint ]
|
||||||
|
|||||||
6
spec/spec_helper.rb
Normal file
6
spec/spec_helper.rb
Normal file
@ -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
|
||||||
Loading…
Reference in New Issue
Block a user