summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorsersut <serdar@opscode.com>2013-06-14 15:28:50 -0700
committersersut <serdar@opscode.com>2013-06-14 15:28:50 -0700
commit596d523e718713b3d772f44e5dbbf122c1b84a18 (patch)
tree6ef165aced11136b713e2e9cc87d039ba87561f5 /spec
parent29ea7170762c01fd0e107a81e5aecde9a298099b (diff)
downloadmixlib-shellout-596d523e718713b3d772f44e5dbbf122c1b84a18.tar.gz
Make sure the parent process' LC_ALL setting is passed to subprocess when LC_ALL is set to nil in the :environment setting.
Diffstat (limited to 'spec')
-rw-r--r--spec/mixlib/shellout_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/mixlib/shellout_spec.rb b/spec/mixlib/shellout_spec.rb
index 131c5e1..bc043bc 100644
--- a/spec/mixlib/shellout_spec.rb
+++ b/spec/mixlib/shellout_spec.rb
@@ -383,6 +383,15 @@ describe Mixlib::ShellOut do
context 'with LC_ALL set to nil' do
let(:locale) { nil }
+ before do
+ @original_lc_all = ENV['LC_ALL']
+ ENV['LC_ALL'] = "en_US.UTF-8"
+ end
+
+ after do
+ ENV['LC_ALL'] = @original_lc_all
+ end
+
context 'when running under Unix', :unix_only do
let(:parent_locale) { ENV['LC_ALL'].to_s.strip }