From e39eee9324c5203ff3825aea22f9a5836ab9bce4 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Mon, 27 Aug 2012 17:08:07 -0700 Subject: Add puppetlabs_spec_helper gem code --- .fixtures.yml | 5 +++++ Rakefile | 9 +-------- spec/spec.opts | 6 ++++++ spec/spec_helper.rb | 14 +------------- 4 files changed, 13 insertions(+), 21 deletions(-) create mode 100644 .fixtures.yml create mode 100644 spec/spec.opts diff --git a/.fixtures.yml b/.fixtures.yml new file mode 100644 index 0000000..8d6f22d --- /dev/null +++ b/.fixtures.yml @@ -0,0 +1,5 @@ +fixtures: + repositories: + concat: "git://github.com/ripienaar/puppet-concat.git" + symlinks: + haproxy: "#{source_dir}" diff --git a/Rakefile b/Rakefile index aa737b9..cd3d379 100644 --- a/Rakefile +++ b/Rakefile @@ -1,8 +1 @@ -require 'rake' -require 'puppet-lint/tasks/puppet-lint' -require 'rspec/core/rake_task' - -RSpec::Core::RakeTask.new(:spec) do |t| - t.rspec_opts = '-c' - t.pattern = 'spec/*/*_spec.rb' -end +require 'puppetlabs_spec_helper/rake_tasks' diff --git a/spec/spec.opts b/spec/spec.opts new file mode 100644 index 0000000..91cd642 --- /dev/null +++ b/spec/spec.opts @@ -0,0 +1,6 @@ +--format +s +--colour +--loadby +mtime +--backtrace diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 9dbbf18..2c6f566 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,13 +1 @@ -require 'puppet' -require 'rubygems' -require 'rspec-puppet' - -fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures')) -RSpec.configure do |c| - c.module_path = File.join(fixture_path, 'modules') - c.manifest_dir = File.join(fixture_path, 'manifests') -end - -class Object - alias :must :should -end +require 'puppetlabs_spec_helper/module_spec_helper' -- cgit v1.2.3