summaryrefslogtreecommitdiff
path: root/spec/functional/mixin
diff options
context:
space:
mode:
authorClaire McQuin <claire@getchef.com>2014-07-10 09:33:06 -0700
committerClaire McQuin <claire@getchef.com>2014-07-10 09:33:57 -0700
commit5010a3d7da0fb8d90dd48b48fe658f581563e7cb (patch)
tree3668b6841a6906764a515cbd1fde236e3a76ce83 /spec/functional/mixin
parent20a14cf7ba7a71acfa07a52e319afd37c413ce7d (diff)
downloadchef-5010a3d7da0fb8d90dd48b48fe658f581563e7cb.tar.gz
Add RSpec matcher match_environment_variable.
Diffstat (limited to 'spec/functional/mixin')
-rw-r--r--spec/functional/mixin/shell_out_spec.rb10
1 files changed, 1 insertions, 9 deletions
diff --git a/spec/functional/mixin/shell_out_spec.rb b/spec/functional/mixin/shell_out_spec.rb
index f188c0472d..92492fcf6f 100644
--- a/spec/functional/mixin/shell_out_spec.rb
+++ b/spec/functional/mixin/shell_out_spec.rb
@@ -29,15 +29,7 @@ describe Chef::Mixin::ShellOut do
shell_out_with_systems_locale('echo $LC_ALL')
end
- 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
+ cmd.stdout.chomp.should match_environment_variable('LC_ALL')
end
end