diff options
author | Moser, Kevin <Kevin.Moser@nordstrom.com> | 2013-01-22 11:47:18 -0800 |
---|---|---|
committer | Moser, Kevin <Kevin.Moser@nordstrom.com> | 2013-01-22 11:47:18 -0800 |
commit | 89bdd5f6fd57c3bd6bd7d89b19f5add9e35d0bde (patch) | |
tree | e9e940d7c3f7ffb9c052977a7b5d0503111a88c3 | |
parent | ea9c00c93268e840c3bed0c05db9c2827ece4e90 (diff) | |
download | mixlib-shellout-89bdd5f6fd57c3bd6bd7d89b19f5add9e35d0bde.tar.gz |
Update check for local system use a downcased computer name
-rw-r--r-- | spec/mixlib/shellout_spec.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/mixlib/shellout_spec.rb b/spec/mixlib/shellout_spec.rb index c44a9c3..14af6e2 100644 --- a/spec/mixlib/shellout_spec.rb +++ b/spec/mixlib/shellout_spec.rb @@ -409,7 +409,8 @@ describe Mixlib::ShellOut do context "when no user is set" do # Need to adjust the username and domain if running as local system # to match how whoami returns the information - local_system = (ENV['USERNAME'].downcase == "x3v7-vagrant$") + + let(:local_system) { (ENV['USERNAME'].downcase == "#{ENV['COMPUTERNAME'].downcase}$") } let(:domain) { local_system ? 'nt authority' : ENV['COMPUTERNAME'].downcase } let(:user) { local_system ? 'system' : ENV['USERNAME'].downcase } it "should run as current user" do |