]> review.fuel-infra Code Review - puppet-modules/puppetlabs-apt.git/commitdiff
Add tests for required_packages change
authorMatthaus Litteken <matthaus@puppetlabs.com>
Fri, 24 Feb 2012 05:04:57 +0000 (21:04 -0800)
committerMatthaus Litteken <matthaus@puppetlabs.com>
Fri, 24 Feb 2012 05:04:57 +0000 (21:04 -0800)
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.

spec/defines/source_spec.rb

index 95c5a5496a897ae8347bc17832ca255bd0f10a81..b74a57d77e3b6ed466c1a8ea9e329ef030213a43 100644 (file)
@@ -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
           })