Skip to content

Commit

Permalink
Merge pull request redhat-openstack#277 from hunner/update_ensure
Browse files Browse the repository at this point in the history
Patch ensure_* tests
  • Loading branch information
hunner committed Jun 20, 2014
2 parents 4523bc5 + 7eda161 commit c634e47
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions spec/acceptance/ensure_packages_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@
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'
Expand Down
6 changes: 2 additions & 4 deletions spec/acceptance/ensure_resource_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@
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'
Expand Down

0 comments on commit c634e47

Please sign in to comment.