diff options
author | aliasgar16 <aliasgar.batterywala@msystechnologies.com> | 2017-01-18 11:47:44 +0530 |
---|---|---|
committer | Bryan McLellan <btm@loftninjas.org> | 2017-01-21 10:46:55 -0500 |
commit | df488cced39aee2076cdb22b4203d6790679f8a1 (patch) | |
tree | 9c3ed5a96f1039125b16f63b1a77365908bd92b9 | |
parent | a78cd04294cb00e1968ee77c1371842a1a24da7c (diff) | |
download | chef-df488cced39aee2076cdb22b4203d6790679f8a1.tar.gz |
Fixed Travis issues.
Signed-off-by: aliasgar16 <aliasgar.batterywala@msystechnologies.com>
-rw-r--r-- | spec/unit/win32/error_spec.rb | 12 | ||||
-rw-r--r-- | spec/unit/win32/security_spec.rb | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/spec/unit/win32/error_spec.rb b/spec/unit/win32/error_spec.rb index 7a2057303d..e8b6d5af6a 100644 --- a/spec/unit/win32/error_spec.rb +++ b/spec/unit/win32/error_spec.rb @@ -31,7 +31,7 @@ describe "Chef::Win32::Error", :windows_only do Chef::ReservedNames::Win32::API::Error::ERROR_USER_NOT_FOUND ) expect(Chef::ReservedNames::Win32::Error).to receive_message_chain(:format_message, :strip) - expect{ Chef::ReservedNames::Win32::Error.raise! }.to raise_error Chef::Exceptions::UserIDNotFound + expect { Chef::ReservedNames::Win32::Error.raise! }.to raise_error Chef::Exceptions::UserIDNotFound end end @@ -40,8 +40,8 @@ describe "Chef::Win32::Error", :windows_only do expect(Chef::ReservedNames::Win32::Error).to receive(:get_last_error).and_return( Chef::ReservedNames::Win32::API::Error::ERROR_BAD_USERNAME ) - expect(Chef::ReservedNames::Win32::Error).to receive_message_chain(:format_message, :strip).and_return('Bad Username') - expect{ Chef::ReservedNames::Win32::Error.raise! }.to raise_error Chef::Exceptions::Win32APIError + expect(Chef::ReservedNames::Win32::Error).to receive_message_chain(:format_message, :strip).and_return("Bad Username") + expect { Chef::ReservedNames::Win32::Error.raise! }.to raise_error Chef::Exceptions::Win32APIError end end end @@ -51,15 +51,15 @@ describe "Chef::Win32::Error", :windows_only do it "raises UserIDNotFound exception" do expect(Chef::ReservedNames::Win32::Error).to_not receive(:get_last_error) expect(Chef::ReservedNames::Win32::Error).to receive_message_chain(:format_message, :strip) - expect{ Chef::ReservedNames::Win32::Error.raise! nil, Chef::ReservedNames::Win32::API::Error::ERROR_USER_NOT_FOUND }.to raise_error Chef::Exceptions::UserIDNotFound + expect { Chef::ReservedNames::Win32::Error.raise! nil, Chef::ReservedNames::Win32::API::Error::ERROR_USER_NOT_FOUND }.to raise_error Chef::Exceptions::UserIDNotFound end end context "last error received is not user_not_found" do it "raises Win32APIError exception" do expect(Chef::ReservedNames::Win32::Error).to_not receive(:get_last_error) - expect(Chef::ReservedNames::Win32::Error).to receive_message_chain(:format_message, :strip).and_return('Bad Username') - expect{ Chef::ReservedNames::Win32::Error.raise! nil, Chef::ReservedNames::Win32::API::Error::ERROR_BAD_USERNAME }.to raise_error Chef::Exceptions::Win32APIError + expect(Chef::ReservedNames::Win32::Error).to receive_message_chain(:format_message, :strip).and_return("Bad Username") + expect { Chef::ReservedNames::Win32::Error.raise! nil, Chef::ReservedNames::Win32::API::Error::ERROR_BAD_USERNAME }.to raise_error Chef::Exceptions::Win32APIError end end end diff --git a/spec/unit/win32/security_spec.rb b/spec/unit/win32/security_spec.rb index 8634526d39..1c755061ce 100644 --- a/spec/unit/win32/security_spec.rb +++ b/spec/unit/win32/security_spec.rb @@ -30,7 +30,7 @@ describe "Chef::Win32::Security", :windows_only do expect(Chef::ReservedNames::Win32::Security).to receive(:GetNamedSecurityInfoW).and_return( Chef::ReservedNames::Win32::API::Error::ERROR_SUCCESS ) - expect { Chef::ReservedNames::Win32::Security.get_named_security_info '/temp_path' }.to_not raise_error + expect { Chef::ReservedNames::Win32::Security.get_named_security_info "/temp_path" }.to_not raise_error end end @@ -39,7 +39,7 @@ describe "Chef::Win32::Security", :windows_only do expect(Chef::ReservedNames::Win32::Security).to receive(:GetNamedSecurityInfoW).and_return( Chef::ReservedNames::Win32::API::Error::ERROR_INVALID_ACCESS ) - expect { Chef::ReservedNames::Win32::Security.get_named_security_info '/temp_path' }.to raise_error Chef::Exceptions::Win32APIError + expect { Chef::ReservedNames::Win32::Security.get_named_security_info "/temp_path" }.to raise_error Chef::Exceptions::Win32APIError end end end @@ -50,7 +50,7 @@ describe "Chef::Win32::Security", :windows_only do expect(Chef::ReservedNames::Win32::Security).to receive(:SetNamedSecurityInfoW).and_return( Chef::ReservedNames::Win32::API::Error::ERROR_SUCCESS ) - expect { Chef::ReservedNames::Win32::Security.set_named_security_info '/temp_path', :SE_FILE_OBJECT, {} }.to_not raise_error + expect { Chef::ReservedNames::Win32::Security.set_named_security_info "/temp_path", :SE_FILE_OBJECT, {} }.to_not raise_error end end @@ -59,7 +59,7 @@ describe "Chef::Win32::Security", :windows_only do expect(Chef::ReservedNames::Win32::Security).to receive(:SetNamedSecurityInfoW).and_return( Chef::ReservedNames::Win32::API::Error::ERROR_USER_NOT_FOUND ) - expect { Chef::ReservedNames::Win32::Security.set_named_security_info '/temp_path', :SE_FILE_OBJECT, {} }.to raise_error Chef::Exceptions::Chef::Exceptions::UserIDNotFound + expect { Chef::ReservedNames::Win32::Security.set_named_security_info "/temp_path", :SE_FILE_OBJECT, {} }.to raise_error Chef::Exceptions::Chef::Exceptions::UserIDNotFound end end end |