diff options
author | Branan Purvine-Riley <branan@puppetlabs.com> | 2012-05-31 10:07:34 -0700 |
---|---|---|
committer | Branan Purvine-Riley <branan@puppetlabs.com> | 2012-05-31 10:07:34 -0700 |
commit | a24401a799eec43bb7f2035c70e5a464d6d31211 (patch) | |
tree | 215a3826f7e338af543096e0c538f1c9174a5240 | |
parent | dca7b9094b9410964f99a88b8878509467adf182 (diff) |
Switch to using puppetlabs_spec_helper as a gem
-rw-r--r-- | .gemfile | 5 | ||||
-rw-r--r-- | .travis.yml | 16 | ||||
-rw-r--r-- | Rakefile | 23 | ||||
-rw-r--r-- | spec/spec_helper.rb | 11 |
4 files changed, 23 insertions, 32 deletions
diff --git a/.gemfile b/.gemfile new file mode 100644 index 0000000..9aad840 --- /dev/null +++ b/.gemfile @@ -0,0 +1,5 @@ +source :rubygems + +puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>= 2.7'] +gem 'puppet', puppetversion +gem 'puppetlabs_spec_helper', '>= 0.1.0' diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..0ec5a08 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,16 @@ +language: ruby +rvm: + - 1.8.7 +before_script: +after_script: +script: "rake spec_full" +branches: + only: + - master +env: + - PUPPET_VERSION=2.7.13 + - PUPPET_VERSION=2.7.6 + - PUPPET_VERSION=2.6.9 +notifications: + email: false +gemfile: .gemfile @@ -1,23 +1,2 @@ -require 'rake' require 'rubygems' -require 'rspec/core/rake_task' - -task :default do - sh %{rake -T} -end - -# Aliases for spec. The (s) versions are used by rvm specs/tests. -task :test => [:spec] -task :tests => [:spec] -task :specs => [:spec] - -desc 'Run all RSpec tests' -RSpec::Core::RakeTask.new(:spec) do |t| - t.rspec_opts = ['--color'] -end - -desc 'Generate code coverage' -RSpec::Core::RakeTask.new(:coverage) do |t| - t.rcov = true - t.rcov_opts = ['--exclude', 'spec'] -end +require 'puppetlabs_spec_helper/rake_tasks' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index b485228..2c6f566 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,10 +1 @@ -require 'puppet' -require 'rspec-puppet' -require 'puppet_spec_helper' - -fixture_dir = File.join(dir = File.expand_path(File.dirname(__FILE__)), "fixtures") - -RSpec.configure do |c| - c.module_path = File.join(fixture_dir, 'modules') - c.manifest_dir = File.join(fixture_dir, 'manifests') -end +require 'puppetlabs_spec_helper/module_spec_helper' |