Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use puppetlabs_spec_helper

  • Loading branch information...
commit 16dc78b9d45b20db2895d6de7aa4263de233e0f3 1 parent 1498583
Carlos Sanchez carlossg authored
5 .fixtures.yml
View
@@ -0,0 +1,5 @@
+fixtures:
+ repositories:
+ wget: git://github.com/maestrodev/puppet-wget.git
+ symlinks:
+ maven: "#{source_dir}"
1  .gitignore
View
@@ -1,3 +1,4 @@
/.project
/pkg
/metadata.json
+/spec/fixtures/
13 Gemfile
View
@@ -1,8 +1,9 @@
source :rubygems
-gem 'puppet', '2.7.12'
-gem 'facter', '1.6.5'
-gem 'rspec-puppet', '0.1.2'
-gem 'rake', '0.9.2.2'
-gem 'puppet-lint', '0.1.12'
-gem 'puppet-module','0.3.4'
+group :rake do
+ gem 'puppet', '~>2.7.17'
+ gem 'rspec-puppet', '>=0.1.3'
+ gem 'rake', '>=0.9.2.2'
+ gem 'puppet-lint', '~>0.1.12'
+ gem 'puppetlabs_spec_helper'
+end
42 Gemfile.lock
View
@@ -2,30 +2,36 @@ GEM
remote: http://rubygems.org/
specs:
diff-lcs (1.1.3)
- facter (1.6.5)
- puppet (2.7.12)
- facter (>= 1.5.1)
+ facter (1.6.10)
+ metaclass (0.0.1)
+ mocha (0.12.0)
+ metaclass (~> 0.0.1)
+ puppet (2.7.18)
+ facter (~> 1.5)
puppet-lint (0.1.12)
- puppet-module (0.3.4)
+ puppetlabs_spec_helper (0.2.0)
+ mocha (>= 0.10.5)
+ rake
+ rspec (>= 2.9.0)
+ rspec-puppet (>= 0.1.1)
rake (0.9.2.2)
- rspec (2.9.0)
- rspec-core (~> 2.9.0)
- rspec-expectations (~> 2.9.0)
- rspec-mocks (~> 2.9.0)
- rspec-core (2.9.0)
- rspec-expectations (2.9.0)
+ rspec (2.11.0)
+ rspec-core (~> 2.11.0)
+ rspec-expectations (~> 2.11.0)
+ rspec-mocks (~> 2.11.0)
+ rspec-core (2.11.0)
+ rspec-expectations (2.11.1)
diff-lcs (~> 1.1.3)
- rspec-mocks (2.9.0)
- rspec-puppet (0.1.2)
+ rspec-mocks (2.11.1)
+ rspec-puppet (0.1.3)
rspec
PLATFORMS
ruby
DEPENDENCIES
- facter (= 1.6.5)
- puppet (= 2.7.12)
- puppet-lint (= 0.1.12)
- puppet-module (= 0.3.4)
- rake (= 0.9.2.2)
- rspec-puppet (= 0.1.2)
+ puppet (~> 2.7.17)
+ puppet-lint (~> 0.1.12)
+ puppetlabs_spec_helper
+ rake (>= 0.9.2.2)
+ rspec-puppet (>= 0.1.3)
20 Rakefile
View
@@ -1,20 +1,6 @@
-require 'rake/clean'
-require 'puppet-lint/tasks/puppet-lint'
-require 'rspec/core/rake_task'
+require 'bundler'
+Bundler.require(:rake)
-CLEAN.include('pkg')
+require 'puppetlabs_spec_helper/rake_tasks'
PuppetLint.configuration.send("disable_80chars")
-
-desc "Run module RSpec tests."
-RSpec::Core::RakeTask.new(:spec) do |t|
- t.rspec_opts = ["--format", "doc", "--color"]
- t.pattern = 'spec/*/*_spec.rb'
-end
-
-desc "Create a Puppet module."
-task :build => [:clean, :spec] do
- sh 'puppet-module build'
-end
-
-task :default => :build
9 spec/fixtures/manifests/site.pp
View
@@ -1,9 +0,0 @@
-node default {
- notify { 'test': }
-}
-
-node /testhost/ {
-}
-
-node 'user.example.com' {
-}
1  spec/fixtures/modules/maven/lib
View
1  spec/fixtures/modules/maven/manifests
View
1  spec/fixtures/modules/maven/templates
View
2  spec/fixtures/modules/wget/manifests/authfetch.pp
View
@@ -1,2 +0,0 @@
-define wget::authfetch($source,$destination,$user,$password='',$timeout='0') {
-}
2  spec/fixtures/modules/wget/manifests/fetch.pp
View
@@ -1,2 +0,0 @@
-define wget::fetch($source,$destination,$timeout='0') {
-}
2  spec/fixtures/modules/wget/manifests/init.pp
View
@@ -1,2 +0,0 @@
-class wget {
-}
9 spec/spec_helper.rb
View
@@ -1,8 +1 @@
-require 'rspec-puppet'
-
-fixture_path = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures'))
-
-RSpec.configure do |c|
- c.module_path = File.join(fixture_path, 'modules')
- c.manifest_dir = File.join(fixture_path, 'manifests')
-end
+require 'puppetlabs_spec_helper/module_spec_helper'
Please sign in to comment.
Something went wrong with that request. Please try again.