summaryrefslogtreecommitdiff
path: root/lib/chef/util
diff options
context:
space:
mode:
authornimisha <nimisha.sharad@msystechnologies.com>2017-02-24 18:46:51 +0530
committerBryan McLellan <btm@loftninjas.org>2017-09-05 20:09:30 -0400
commit24de354c67305563f677080c03b8892c4a9e0fb1 (patch)
tree9e3657586d78f843aa3e139ecccba9d67e72efaf /lib/chef/util
parent35f4cafac60770b59853d7e12b418f1971d234db (diff)
downloadchef-24de354c67305563f677080c03b8892c4a9e0fb1.tar.gz
Fixing specs
Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
Diffstat (limited to 'lib/chef/util')
-rw-r--r--lib/chef/util/windows/logon_session.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/chef/util/windows/logon_session.rb b/lib/chef/util/windows/logon_session.rb
index 6ef49e96a3..adabdbb3ef 100644
--- a/lib/chef/util/windows/logon_session.rb
+++ b/lib/chef/util/windows/logon_session.rb
@@ -40,7 +40,7 @@ class Chef
def open
if session_opened
- raise RuntimeError, "Attempted to open a logon session that was already open."
+ raise "Attempted to open a logon session that was already open."
end
username = wstring(original_username)
@@ -73,11 +73,11 @@ class Chef
validate_session_open!
if ! session_opened
- raise RuntimeError, "Attempted to set the user context before opening a session."
+ raise "Attempted to set the user context before opening a session."
end
if impersonating
- raise RuntimeError, "Attempt to set the user context when the user context is already set."
+ raise "Attempt to set the user context when the user context is already set."
end
status = Chef::ReservedNames::Win32::API::Security.ImpersonateLoggedOnUser(token.read_ulong)
@@ -117,7 +117,7 @@ class Chef
def validate_session_open!
if ! session_opened
- raise RuntimeError, "Attempted to set the user context before opening a session."
+ raise "Attempted to set the user context before opening a session."
end
end
end