summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2014-08-28 16:19:25 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2014-08-28 16:19:25 -0700
commit767ea4fc19cb29a55a81a55d1a13643ae3108f4c (patch)
tree811674aa726c2478352e2d87744ad5105db26da8 /spec
parent3b389790688adb1007b33476ec2e2b6111e26d76 (diff)
downloadmixlib-shellout-767ea4fc19cb29a55a81a55d1a13643ae3108f4c.tar.gz
remove LC_ALL default environment variable
now that we no longer support ruby 1.8.7 its time to retire this
Diffstat (limited to 'spec')
-rw-r--r--spec/mixlib/shellout_spec.rb21
1 files changed, 8 insertions, 13 deletions
diff --git a/spec/mixlib/shellout_spec.rb b/spec/mixlib/shellout_spec.rb
index e009dd8..0a1b0a8 100644
--- a/spec/mixlib/shellout_spec.rb
+++ b/spec/mixlib/shellout_spec.rb
@@ -42,8 +42,8 @@ describe Mixlib::ShellOut do
its(:live_stream) { should be_nil }
its(:input) { should be_nil }
- it "should set default environmental variables" do
- shell_cmd.environment.should == {"LC_ALL" => "C"}
+ it "should not set any default environmental variables" do
+ shell_cmd.environment.should == {}
end
end
@@ -314,7 +314,7 @@ describe Mixlib::ShellOut do
end
it "should add environment settings to the default" do
- shell_cmd.environment.should eql({'LC_ALL' => 'C', 'RUBY_OPTS' => '-w'})
+ shell_cmd.environment.should eql({'RUBY_OPTS' => '-w'})
end
context 'when setting custom environments' do
@@ -322,7 +322,7 @@ describe Mixlib::ShellOut do
let(:options) { { :env => environment } }
it "should also set the enviroment" do
- shell_cmd.environment.should eql({'LC_ALL' => 'C', 'RUBY_OPTS' => '-w'})
+ shell_cmd.environment.should eql({'RUBY_OPTS' => '-w'})
end
end
@@ -431,8 +431,8 @@ describe Mixlib::ShellOut do
context 'without specifying environment' do
let(:options) { nil }
- it "should use the C locale by default" do
- should eql('C')
+ it "should no longer use the C locale by default" do
+ should eql("")
end
end
@@ -459,8 +459,8 @@ describe Mixlib::ShellOut do
context 'when running under Unix', :unix_only do
let(:parent_locale) { ENV['LC_ALL'].to_s.strip }
- it "should use the parent process's locale" do
- should eql(parent_locale)
+ it "should unset the parent process's locale" do
+ should eql("")
end
end
@@ -574,7 +574,6 @@ describe Mixlib::ShellOut do
subject { chomped_stdout }
let(:cmd) { script_name }
-
context 'when running under Unix', :unix_only do
let(:script_content) { 'echo blah' }
@@ -620,7 +619,6 @@ describe Mixlib::ShellOut do
end
end
-
context 'with lots of long arguments' do
subject { chomped_stdout }
@@ -645,7 +643,6 @@ describe Mixlib::ShellOut do
end
end
-
context 'with backslashes' do
subject { stdout }
let(:backslashes) { %q{\\"\\\\} }
@@ -919,7 +916,6 @@ describe Mixlib::ShellOut do
end
end
-
context 'with open files for parent process' do
before do
@test_file = Tempfile.new('fd_test')
@@ -1056,7 +1052,6 @@ describe Mixlib::ShellOut do
CODE
end
-
it "should TERM the wayward child and grandchild, then KILL whoever is left" do
# note: let blocks don't correctly memoize if an exception is raised,
# so can't use executed_cmd