aboutsummaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2015-12-07 00:22:50 +0100
committervarac <varacanero@zeromail.org>2015-12-07 13:29:41 +0100
commit6b27efb4346e61280f041b63dd8df7ad1f2e7f81 (patch)
treec7a636e41b703eb12ce2b4876a17819bd62b7388 /Rakefile
parentd372562329371c24df889d69ca4d476eda6497e9 (diff)
downloadpuppet-apt-6b27efb4346e61280f041b63dd8df7ad1f2e7f81.tar.gz
puppet-apt-6b27efb4346e61280f041b63dd8df7ad1f2e7f81.tar.bz2
Add inital puppet rspec test for custom facts
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
new file mode 100644
index 0000000..85326bb
--- /dev/null
+++ b/Rakefile
@@ -0,0 +1,19 @@
+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"
+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"
+ end
+end
+
+task :test => [:lint, :syntax , :validate, :spec]