2 describe 'apt::builddep', :type => :define do
4 let(:title) { 'my_package' }
6 describe "should succeed with a Class['apt']" do
7 let(:pre_condition) { 'class {"apt": } ' }
9 it { should contain_exec("apt-update-#{title}").with_command("/usr/bin/apt-get update").with_refreshonly(true) }
12 describe "should fail without Class['apt']" do
13 it { expect {should contain_exec("apt-update-#{title}").with_command("/usr/bin/apt-get update").with_refreshonly(true) }\
14 .to raise_error(Puppet::Error)