diff --git a/spec/unit/parser/scope_spec.rb b/spec/unit/parser/scope_spec.rb index 73cff7c512b..30e9e00988c 100755 --- a/spec/unit/parser/scope_spec.rb +++ b/spec/unit/parser/scope_spec.rb @@ -64,11 +64,11 @@ end it "should raise NoMethodError if the method doesn't look like a function" do - expect { @scope.sprintf(["%b", 123]) }.should raise_error(NoMethodError) + expect { @scope.sprintf(["%b", 123]) }.to raise_error(NoMethodError) end it "should raise NoMethodError if the method looks like a function but doesn't exist" do - expect { @scope.function_fake_bs(['cows']) }.should raise_error(NoMethodError) + expect { @scope.function_fake_bs(['cows']) }.to raise_error(NoMethodError) end end diff --git a/spec/unit/ssl/certificate_authority_spec.rb b/spec/unit/ssl/certificate_authority_spec.rb index c994911669e..a7d3a71daf6 100755 --- a/spec/unit/ssl/certificate_authority_spec.rb +++ b/spec/unit/ssl/certificate_authority_spec.rb @@ -334,7 +334,7 @@ def stub_ca_host expect do @ca.sign(@name, false, @request) - end.should_not raise_error(Puppet::SSL::CertificateAuthority::CertificateSigningError) + end.not_to raise_error(Puppet::SSL::CertificateAuthority::CertificateSigningError) end it "should save the resulting certificate" do