d522877cdd
The hash passing to the with method is cleaner and closer to puppet code, so all of the with_$param have been replaced with with($hash). This also includes two minor whitspace changes to unstable.pp and source.pp. This also replaces the ternary switch on param_set with a hash merge, which is cleaner and will support more use cases.
25 lines
619 B
Ruby
25 lines
619 B
Ruby
require 'spec_helper'
|
|
describe 'apt::builddep', :type => :define do
|
|
|
|
let(:title) { 'my_package' }
|
|
|
|
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",
|
|
'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",
|
|
'refreshonly' => true
|
|
}).to raise_error(Puppet::Error)
|
|
}
|
|
}
|
|
end
|
|
|
|
end
|