Sha256: d83ff3870ed9d79cf333b630db100adc5bf059e60323e121c937241ed0d3302d
Contents?: true
Size: 398 Bytes
Versions: 10
Compression:
Stored size: 398 Bytes
Contents
describe Kernel do it 'should capture STDOUT text' do capture_stdout do puts "hello\nworld!" end.should == "hello\nworld!\n" end it 'should restore STDOUT correctly on exceptions' do old = $stdout old.should == STDOUT begin capture_stdout do raise 'foo' end rescue end $stdout.should == STDOUT $stdout.should == old end end
Version data entries
10 entries across 10 versions & 1 rubygems