|
10 | 10 | end |
11 | 11 |
|
12 | 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/) } |
| 13 | + it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, /0 for 1 or 2/) } |
| 14 | + it { is_expected.to run.with_params(1,2,3).and_raise_error(Puppet::ParseError, /3 for 1 or 2/) } |
| 15 | + it { is_expected.to run.with_params('foo').and_raise_error(Puppet::ParseError, /Requires all arguments/) } |
| 16 | + it { is_expected.to run.with_params({},'foo').and_raise_error(Puppet::ParseError, /Requires all arguments/) } |
17 | 17 |
|
18 | | - it { should run.with_params({}) } |
19 | | - it { should run.with_params({},{}) } |
| 18 | + it { is_expected.to run.with_params({}) } |
| 19 | + it { is_expected.to run.with_params({},{}) } |
20 | 20 |
|
21 | | - it { should run.with_params({ 1 => 2 }).and_raise_error(Puppet::ParseError, /Section 1 must contain a Hash/) } |
| 21 | + it { is_expected.to run.with_params({ 'section' => { 'setting' => 'value' }}).and_raise_error(Puppet::ParseError, /must pass the path parameter/) } |
| 22 | + it { is_expected.to run.with_params({ 1 => 2 }).and_raise_error(Puppet::ParseError, /Section 1 must contain a Hash/) } |
22 | 23 | end |
23 | 24 | end |
0 commit comments