diff options
author | Akshay Karle <akshay.a.karle@gmail.com> | 2014-01-06 17:58:46 -0300 |
---|---|---|
committer | Akshay Karle <akshay.a.karle@gmail.com> | 2014-01-06 17:59:01 -0300 |
commit | 76e139b00771a5509d4fbebb9a26a54349cca503 (patch) | |
tree | 310dc77ee9a7b3e1154b96ec4520813120bbafd4 | |
parent | c0173e6b26dff8e8f99a779412eafccb1d2165d0 (diff) | |
download | mixlib-shellout-76e139b00771a5509d4fbebb9a26a54349cca503.tar.gz |
Add a spec for showing stderr to live_stream.
-rw-r--r-- | spec/mixlib/shellout_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/mixlib/shellout_spec.rb b/spec/mixlib/shellout_spec.rb index 23d9a13..fed9c44 100644 --- a/spec/mixlib/shellout_spec.rb +++ b/spec/mixlib/shellout_spec.rb @@ -447,12 +447,18 @@ describe Mixlib::ShellOut do context "with a live stream" do let(:stream) { StringIO.new } let(:ruby_code) { 'puts "hello"' } + let(:ruby_code) { '$stderr.puts "world"' } let(:options) { { :live_stream => stream } } it "should copy the child's stdout to the live stream" do shell_cmd.run_command stream.string.should eql("hello#{LINE_ENDING}") end + + it "should copy the child's stderr to the live stream" do + shell_cmd.run_command + stream.string.should eql("world#{LINE_ENDING}") + end end context "with an input" do |