summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorMatt Wrock <matt@mattwrock.com>2015-09-24 14:05:53 -0700
committerMatt Wrock <matt@mattwrock.com>2015-09-24 14:05:53 -0700
commit4ea4442d8a6d761eb630b58bce222164de320f4d (patch)
treeb131e2e7ef54d3e1b8340da4f074dd01a0bd2122 /spec
parent2b71f53db356712021a1459323368cec587282c2 (diff)
downloadmixlib-shellout-4ea4442d8a6d761eb630b58bce222164de320f4d.tar.gz
make tests pass when run by a domain joined user
Diffstat (limited to 'spec')
-rw-r--r--spec/mixlib/shellout_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/mixlib/shellout_spec.rb b/spec/mixlib/shellout_spec.rb
index 1c5ce31..2acdc3b 100644
--- a/spec/mixlib/shellout_spec.rb
+++ b/spec/mixlib/shellout_spec.rb
@@ -621,7 +621,7 @@ describe Mixlib::ShellOut do
end
context "when running under Windows", :windows_only do
- let(:cmd) { 'whoami.exe' }
+ let(:cmd) { '%windir%/system32/whoami.exe' }
let(:running_user) { shell_cmd.run_command.stdout.strip.downcase }
context "when no user is set" do
@@ -629,7 +629,7 @@ describe Mixlib::ShellOut do
# to match how whoami returns the information
it "should run as current user" do
- expect(running_user).to eql("#{ENV['COMPUTERNAME'].downcase}\\#{ENV['USERNAME'].downcase}")
+ expect(running_user).to eql("#{ENV['USERDOMAIN'].downcase}\\#{ENV['USERNAME'].downcase}")
end
end