File tree Expand file tree Collapse file tree 1 file changed +3
-15
lines changed
Expand file tree Collapse file tree 1 file changed +3
-15
lines changed Original file line number Diff line number Diff line change 165165 describe 'ensure => badvalue' do
166166 let ( :params ) { { ensure : 'badvalue' } }
167167
168- it 'fails' do
169- expect do
170- is_expected . to raise_error ( Puppet ::Error , %r{ensure parameter must be present or absent} )
171- end
172- end
168+ it { is_expected . to compile . and_raise_error ( %r{expects a match for} ) }
173169 end
174170
175171 describe 'autoupgrade => true' do
189185 describe 'autoupgrade => badvalue' do
190186 let ( :params ) { { autoupgrade : 'badvalue' } }
191187
192- it 'fails' do
193- expect do
194- is_expected . to raise_error ( Puppet ::Error , %r{"badvalue" is not a boolean.} )
195- end
196- end
188+ it { is_expected . to compile . and_raise_error ( %r{expects a Boolean value, got String} ) }
197189 end
198190
199191 describe 'service_ensure => badvalue' do
200192 let ( :params ) { { service_ensure : 'badvalue' } }
201193
202- it 'fails' do
203- expect do
204- is_expected . to raise_error ( Puppet ::Error , %r{service_ensure parameter must be running or stopped} )
205- end
206- end
194+ it { is_expected . to compile . and_raise_error ( %r{expects a match for Stdlib::Ensure::Service} ) }
207195 end
208196
209197 describe 'service_config_perms => "0123"' do
You can’t perform that action at this time.
0 commit comments