From 69d1137982f1fe1a5db03bf36ba2a2462d03ccc5 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Mon, 30 Sep 2013 01:47:14 -0400 Subject: [PATCH] Modify template for whatpulse --- Rakefile | 7 +++++++ manifests/init.pp | 8 ++++++-- spec/classes/template_spec.rb | 9 --------- spec/classes/whatpulse_spec.rb | 11 +++++++++++ spec/fixtures/Puppetfile | 1 - .../modules/{template => whatpulse}/manifests | 0 6 files changed, 24 insertions(+), 12 deletions(-) create mode 100644 Rakefile delete mode 100644 spec/classes/template_spec.rb create mode 100644 spec/classes/whatpulse_spec.rb rename spec/fixtures/modules/{template => whatpulse}/manifests (100%) diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..e6443dc --- /dev/null +++ b/Rakefile @@ -0,0 +1,7 @@ +require 'rake' + +require 'rspec/core/rake_task' + +RSpec::Core::RakeTask.new(:spec) do |t| + t.pattern = 'spec/*/*_spec.rb' +end diff --git a/manifests/init.pp b/manifests/init.pp index f37656c..a394987 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,4 +1,8 @@ # This is a placeholder class. -class template { - anchor { 'Hello_World': } +class whatpulse { + package { 'Whatpulse': + source => 'http://amcdn.whatpulse.org/files/whatpulse-mac-2.2.1.dmg', + provider => appdmg + } } + diff --git a/spec/classes/template_spec.rb b/spec/classes/template_spec.rb deleted file mode 100644 index 3aee804..0000000 --- a/spec/classes/template_spec.rb +++ /dev/null @@ -1,9 +0,0 @@ -require 'spec_helper' -# Rename this file to classname_spec.rb -# Check other boxen modules for examples -# or read http://rspec-puppet.com/tutorial/ -describe 'template' do - it do - should contain_anchor('Hello_World') - end -end diff --git a/spec/classes/whatpulse_spec.rb b/spec/classes/whatpulse_spec.rb new file mode 100644 index 0000000..aaca85d --- /dev/null +++ b/spec/classes/whatpulse_spec.rb @@ -0,0 +1,11 @@ +require 'spec_helper' + +describe 'whatpulse' do + it do + should contain_package('Whatpulse').with({ + :source => 'http://amcdn.whatpulse.org/files/whatpulse-mac-2.2.1.dmg', + :provider => 'appdmg' + }) + end +end + diff --git a/spec/fixtures/Puppetfile b/spec/fixtures/Puppetfile index 3d5bc4a..2519e12 100644 --- a/spec/fixtures/Puppetfile +++ b/spec/fixtures/Puppetfile @@ -1,2 +1 @@ mod 'boxen', '2.1.0', :github_tarball => 'boxen/puppet-boxen' -mod 'stdlib', '4.0.0', :github_tarball => "puppetlabs/puppetlabs-stdlib" diff --git a/spec/fixtures/modules/template/manifests b/spec/fixtures/modules/whatpulse/manifests similarity index 100% rename from spec/fixtures/modules/template/manifests rename to spec/fixtures/modules/whatpulse/manifests