From: Matthaus Litteken Date: Fri, 24 Feb 2012 05:04:57 +0000 (-0800) Subject: Add tests for required_packages change X-Git-Tag: 0.0.1~6^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=1dcbf3d3035b5eb50839bb2e182663b539cf2d6a;p=puppet-modules%2Fpuppetlabs-apt.git Add tests for required_packages change This updates the tests for the apt::source defined type to use the new name for the exec resource and the new parameter for the same exec. --- diff --git a/spec/defines/source_spec.rb b/spec/defines/source_spec.rb index 95c5a54..b74a57d 100644 --- a/spec/defines/source_spec.rb +++ b/spec/defines/source_spec.rb @@ -89,12 +89,14 @@ describe 'apt::source', :type => :define do it { if param_hash[:required_packages] - should contain_exec("/usr/bin/apt-get -y install #{param_hash[:required_packages]}").with({ + should contain_exec("Required packages: '#{param_hash[:required_packages]}' for #{title}").with({ + "command" => "/usr/bin/apt-get -y install #{param_hash[:required_packages]}", "subscribe" => "File[#{title}.list]", "refreshonly" => true }) else - should_not contain_exec("/usr/bin/apt-get -y install #{param_hash[:required_packages]}").with({ + should_not contain_exec("Required packages: '#{param_hash[:required_packages]}' for #{title}").with({ + "command" => "/usr/bin/apt-get -y install #{param_hash[:required_packages]}", "subscribe" => "File[#{title}.list]", "refreshonly" => true })