summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHunter Haugen <hunter@puppetlabs.com>2014-06-20 13:51:29 -0700
committerHunter Haugen <hunter@puppetlabs.com>2014-06-20 13:51:29 -0700
commitc634e4748c15b15af22c4c18fc0951bd8d07ee3b (patch)
tree3d0af8f32f19346a8e2c56742bf7fe81d534bbda
parent4523bc50ca4eaac2f4a8d2840d1d13ec68742ab0 (diff)
parent7eda161be88e4eeca44a288cb0394f51ea9e0621 (diff)
Merge pull request #277 from hunner/update_ensure
Patch ensure_* tests
-rwxr-xr-xspec/acceptance/ensure_packages_spec.rb6
-rwxr-xr-xspec/acceptance/ensure_resource_spec.rb6
2 files changed, 4 insertions, 8 deletions
diff --git a/spec/acceptance/ensure_packages_spec.rb b/spec/acceptance/ensure_packages_spec.rb
index f3d2256..12da0cd 100755
--- a/spec/acceptance/ensure_packages_spec.rb
+++ b/spec/acceptance/ensure_packages_spec.rb
@@ -4,15 +4,13 @@ require 'spec_helper_acceptance'
describe 'ensure_packages function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
describe 'success' do
it 'ensure_packages a package' do
- apply_manifest('package { "zsh": ensure => absent, }')
+ apply_manifest('package { "rake": ensure => absent, provider => "gem", }')
pp = <<-EOS
$a = "rake"
ensure_packages($a,{'provider' => 'gem'})
EOS
- apply_manifest(pp, :expect_changes => true) do |r|
- expect(r.stdout).to match(/Package\[zsh\]\/ensure: (created|ensure changed 'purged' to 'present')/)
- end
+ apply_manifest(pp, :expect_changes => true)
end
it 'ensures a package already declared'
it 'takes defaults arguments'
diff --git a/spec/acceptance/ensure_resource_spec.rb b/spec/acceptance/ensure_resource_spec.rb
index 725f5df..2aad243 100755
--- a/spec/acceptance/ensure_resource_spec.rb
+++ b/spec/acceptance/ensure_resource_spec.rb
@@ -4,15 +4,13 @@ require 'spec_helper_acceptance'
describe 'ensure_resource function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
describe 'success' do
it 'ensure_resource a package' do
- apply_manifest('package { "zsh": ensure => absent, }')
+ apply_manifest('package { "rake": ensure => absent, provider => "gem", }')
pp = <<-EOS
$a = "rake"
ensure_resource('package', $a, {'provider' => 'gem'})
EOS
- apply_manifest(pp, :expect_changes => true) do |r|
- expect(r.stdout).to match(/Package\[zsh\]\/ensure: created/)
- end
+ apply_manifest(pp, :expect_changes => true)
end
it 'ensures a resource already declared'
it 'takes defaults arguments'