diff options
-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' |