Announcement (2017-05-07): www.ruby-forum.com is now read-only since I
unfortunately do not have the time to support and maintain the forum any
more. Please see rubyonrails.org/community and ruby-lang.org/en/community
for other Rails- und Ruby-related community platforms.

I would be opposed to making the MSpec runner depend on any more
stdlibs. I would suggest making a helper that swaps the IOStub with the
real stdout for the duration of a block.
JD
....there is no try
Sent from my phone. Please excuse typos and txtspk.

The "output" matcher from the snippet below swaps stdout with IOStub in
order to be able to capture the output of the block. Swapping IOStub
back with real stdout will not work as you will not know what the block
printed...
lambda { $stdout.print(o, o2) }.should
output("#{o.to_s}#{o2.to_s}#{$\}")
One hybrid way to fix this would be for the "output" matcher to take an
IO object as a second optional parameter that is used to capture the
output intead of using IOStub. Then print_spec.rb could provide a
StringIO object. Currently, print_spec.rb is busted and does not test
what it is supposed to. Taking a dependency on a stdlib (stringio) would
not be worse thing in this case.
I do not feel strongly about fixing this right now...
________________________________________
From: ironruby-core-bounces@rubyforge.org
[ironruby-core-bounces@rubyforge.org] On Behalf Of Jim Deville
[jdeville@microsoft.com]
Sent: Saturday, May 16, 2009 4:05 PM
To: ironruby-core@rubyforge.org
Subject: Re: [Ironruby-core] Code Review: Fix for File.print misbehavior
I would be opposed to making the MSpec runner depend on any more
stdlibs. I would suggest making a helper that swaps the IOStub with the
real stdout for the duration of a block.
JD
....there is no try
Sent from my phone. Please excuse typos and txtspk.