summaryrefslogtreecommitdiff
path: root/spec/functional/mixin
diff options
context:
space:
mode:
authorClaire McQuin <claire@getchef.com>2014-07-09 17:04:19 -0700
committerClaire McQuin <claire@getchef.com>2014-07-09 17:04:19 -0700
commit20a14cf7ba7a71acfa07a52e319afd37c413ce7d (patch)
treeff4ab9d734d062419fcd03cbcd1a9dcebc9fca30 /spec/functional/mixin
parent8e18da100f3bec8f2c761ba0d040b468987039ef (diff)
downloadchef-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.rb10
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