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.
22 lines
474 B
Ruby
22 lines
474 B
Ruby
require 'spec_helper'
|
|
describe 'apt::release', :type => :class do
|
|
let (:title) { 'my_package' }
|
|
|
|
let :param_set do
|
|
{ :release_id => 'precise' }
|
|
end
|
|
|
|
let (:params) { param_set }
|
|
|
|
it { should include_class("apt::params") }
|
|
|
|
it {
|
|
should contain_file("/etc/apt/apt.conf.d/01release").with({
|
|
"owner" => "root",
|
|
"group" => "root",
|
|
"mode" => 644,
|
|
"content" => "APT::Default-Release \"#{param_set[:release_id]}\";"
|
|
})
|
|
}
|
|
end
|
|
|