From e30a3b6a9e4931201aab59f61ab27e60c7446b5c Mon Sep 17 00:00:00 2001 From: Akshay Karle Date: Mon, 6 Jan 2014 18:25:09 -0300 Subject: Fix a broken spec --- spec/mixlib/shellout_spec.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'spec') diff --git a/spec/mixlib/shellout_spec.rb b/spec/mixlib/shellout_spec.rb index fed9c44..e20a85c 100644 --- a/spec/mixlib/shellout_spec.rb +++ b/spec/mixlib/shellout_spec.rb @@ -446,18 +446,17 @@ 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(:ruby_code) { '$stdout.puts "hello"; $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}") + stream.string.should include("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}") + stream.string.should include("world#{LINE_ENDING}") end end -- cgit v1.2.1