Module sync 1d81b6a
[puppet-modules/puppetlabs-apt.git] / spec / defines / pin_spec.rb
index a01a919a5b2e42636b49aa8a97460613a54f45ee..52ecb97132beddc48116fca47227a889c5b61142 100644 (file)
@@ -88,9 +88,7 @@ describe 'apt::pin', type: :define do
       end
 
       it do
-        expect {
-          subject.call
-        }.to raise_error(Puppet::Error, %r{expects an Integer value, got String})
+        is_expected.to raise_error(Puppet::Error, %r{expects an Integer value, got String})
       end
     end
 
@@ -102,9 +100,7 @@ describe 'apt::pin', type: :define do
       end
 
       it do
-        expect {
-          subject.call
-        }.to raise_error(Puppet::Error, %r{parameter version cannot be used in general form})
+        is_expected.to raise_error(Puppet::Error, %r{parameter version cannot be used in general form})
       end
     end
 
@@ -117,9 +113,7 @@ describe 'apt::pin', type: :define do
       end
 
       it do
-        expect {
-          subject.call
-        }.to raise_error(Puppet::Error, %r{parameters release and origin are mutually exclusive})
+        is_expected.to raise_error(Puppet::Error, %r{parameters release and origin are mutually exclusive})
       end
     end
 
@@ -133,9 +127,7 @@ describe 'apt::pin', type: :define do
       end
 
       it do
-        expect {
-          subject.call
-        }.to raise_error(Puppet::Error, %r{parameters release, origin, and version are mutually exclusive})
+        is_expected.to raise_error(Puppet::Error, %r{parameters release, origin, and version are mutually exclusive})
       end
     end
 
@@ -149,9 +141,7 @@ describe 'apt::pin', type: :define do
       end
 
       it do
-        expect {
-          subject.call
-        }.to raise_error(Puppet::Error, %r{parameters release, origin, and version are mutually exclusive})
+        is_expected.to raise_error(Puppet::Error, %r{parameters release, origin, and version are mutually exclusive})
       end
     end
   end