X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Fdefines%2Fbuilddep_spec.rb;h=52a0704a3bde7592f01c4670cb77bd2b5e3cc4c1;hb=644ed232a0c402b1020b697a10c612db68a9ffa4;hp=d60a330e0c1ad538b76e8cc39a863792711083af;hpb=2d688f4cdc121da434db873f818dd95977385a46;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/spec/defines/builddep_spec.rb b/spec/defines/builddep_spec.rb index d60a330..52a0704 100644 --- a/spec/defines/builddep_spec.rb +++ b/spec/defines/builddep_spec.rb @@ -6,12 +6,19 @@ describe 'apt::builddep', :type => :define do describe "should succeed with a Class['apt']" do let(:pre_condition) { 'class {"apt": } ' } - it { should contain_exec("apt-update-#{title}").with_command("/usr/bin/apt-get update").with_refreshonly(true) } + it { should contain_exec("apt-update-#{title}").with({ + 'command' => "/usr/bin/apt-get update", + 'refreshonly' => true + }) + } end describe "should fail without Class['apt']" do - it { expect {should contain_exec("apt-update-#{title}").with_command("/usr/bin/apt-get update").with_refreshonly(true) }\ - .to raise_error(Puppet::Error) + it { expect {should contain_exec("apt-update-#{title}").with({ + 'command' => "/usr/bin/apt-get update", + 'refreshonly' => true + }).to raise_error(Puppet::Error) + } } end