summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2014-10-12 12:18:05 +0200
committermh <mh@immerda.ch>2014-10-12 12:18:05 +0200
commit9a5b4d4b56ce78d918ef6a978047bdc4d9bfb72a (patch)
tree01f57acdcfe233872eb496b2bafa1f7c3979f890 /Rakefile
parent5b8288629495c1b84a61880c9bcfef21e84b4b12 (diff)
a first shot of tests
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
new file mode 100644
index 0000000..ec1c52b
--- /dev/null
+++ b/Rakefile
@@ -0,0 +1,26 @@
+require 'bundler'
+Bundler.require(:rake)
+
+require 'puppetlabs_spec_helper/rake_tasks'
+require 'puppet-lint/tasks/puppet-lint'
+
+Rake::Task[:lint].clear
+PuppetLint::RakeTask.new :lint do |config|
+ config.ignore_paths = ["spec/**/*.pp", "vendor/**/*.pp"]
+ config.log_format = '%{path}:%{linenumber}:%{KIND}: %{message}'
+ config.disable_checks = [ "class_inherits_from_params_class", "80chars" ]
+end
+
+# use librarian-puppet to manage fixtures instead of .fixtures.yml
+# offers more possibilities like explicit version management, forge downloads,...
+task :librarian_spec_prep do
+ sh "librarian-puppet install --path=spec/fixtures/modules/"
+ pwd = `pwd`.strip
+ unless File.directory?("#{pwd}/spec/fixtures/modules/apache")
+ sh "ln -s #{pwd} #{pwd}/spec/fixtures/modules/apache"
+ end
+end
+task :spec_prep => :librarian_spec_prep
+
+
+task :default => [:spec, :lint]