aboutsummaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorMicah <micah@riseup.net>2016-11-03 17:16:07 +0000
committerMicah <micah@riseup.net>2016-11-03 17:16:07 +0000
commit9b3d0025a8a968499f5d24d76a66af0b7f1ba9cd (patch)
tree7132904362ca013463d63b1dda937260f2006066 /Rakefile
parentc67a270a56244b859d251d050a696ec4ba0e7805 (diff)
parentf4af02ee7a6d4d071506642bec1401662d1da964 (diff)
downloadpuppet-common-9b3d0025a8a968499f5d24d76a66af0b7f1ba9cd.tar.gz
puppet-common-9b3d0025a8a968499f5d24d76a66af0b7f1ba9cd.tar.bz2
Merge branch 'tests' into 'master'
Add rspec skeleton See merge request !5
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]