Skip to content

Commit eea6c8c

Browse files
committed
Use compile.and_raise_error
1 parent 01be2c1 commit eea6c8c

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

spec/classes/repo_yum_spec.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@
3030
end
3131

3232
it 'does not install' do
33-
expect do
34-
is_expected.to create_file('/etc/yum.repos.d/glusterfs-x86_64.repo')
35-
end.to raise_error(Puppet::Error, %r{doesn't make sense!})
33+
is_expected.to compile.and_raise_error(%r{doesn't make sense!})
3634
end
3735
end
3836
context 'unsupported architecture' do
@@ -43,9 +41,7 @@
4341
end
4442

4543
it 'does not install' do
46-
expect do
47-
is_expected.to create_file('/etc/yum.repos.d/glusterfs-x86_64.repo')
48-
end.to raise_error(Puppet::Error, %r{not yet supported})
44+
is_expected.to compile.and_raise_error(%r{not yet supported})
4945
end
5046
end
5147
context 'latest Gluster with priority' do

0 commit comments

Comments
 (0)