From 7eda161be88e4eeca44a288cb0394f51ea9e0621 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Fri, 20 Jun 2014 10:41:43 -0700 Subject: Patch ensure_* tests --- spec/acceptance/ensure_packages_spec.rb | 6 ++---- spec/acceptance/ensure_resource_spec.rb | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'spec') 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' -- cgit v1.2.3