diff options
author | Claire McQuin <claire@getchef.com> | 2014-07-09 17:04:19 -0700 |
---|---|---|
committer | Claire McQuin <claire@getchef.com> | 2014-07-09 17:04:19 -0700 |
commit | 20a14cf7ba7a71acfa07a52e319afd37c413ce7d (patch) | |
tree | ff4ab9d734d062419fcd03cbcd1a9dcebc9fca30 /spec/functional/mixin | |
parent | 8e18da100f3bec8f2c761ba0d040b468987039ef (diff) | |
download | chef-20a14cf7ba7a71acfa07a52e319afd37c413ce7d.tar.gz |
Update expected result when LC_ALL is not set in Windows.
Diffstat (limited to 'spec/functional/mixin')
-rw-r--r-- | spec/functional/mixin/shell_out_spec.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/functional/mixin/shell_out_spec.rb b/spec/functional/mixin/shell_out_spec.rb index 55cd3c7c61..f188c0472d 100644 --- a/spec/functional/mixin/shell_out_spec.rb +++ b/spec/functional/mixin/shell_out_spec.rb @@ -29,7 +29,15 @@ describe Chef::Mixin::ShellOut do shell_out_with_systems_locale('echo $LC_ALL') end - cmd.stdout.chomp.should eq ENV['LC_ALL'].to_s + expected_systems_locale = if windows? && ENV['LC_ALL'].nil? + # On Windows, if an environment variable is not set, the command + # `echo %VARNAME%` outputs %VARNAME% + "%LC_ALL%" + else + ENV['LC_ALL'].to_s + end + + cmd.stdout.chomp.should eq expected_systems_locale.to_s end end |