6 describe 'create_ini_settings' do
8 Puppet::Parser::Functions.autoloader.loadall
9 Puppet::Parser::Functions.function(:create_resources)
12 describe 'argument handling' do
13 it { should run.with_params.and_raise_error(Puppet::ParseError, /0 for 1 or 2/) }
14 it { should run.with_params(1,2,3).and_raise_error(Puppet::ParseError, /3 for 1 or 2/) }
15 it { should run.with_params('foo').and_raise_error(Puppet::ParseError, /Requires all arguments/) }
16 it { should run.with_params({},'foo').and_raise_error(Puppet::ParseError, /Requires all arguments/) }
18 it { should run.with_params({}) }
19 it { should run.with_params({},{}) }
21 it { should run.with_params({ 1 => 2 }).and_raise_error(Puppet::ParseError, /Section 1 must contain a Hash/) }