Unable to print STDOUT Ruby

I have been running Rspec tests and want to print out STDOUT. It seems like a very simple problem yet I see very little documentation about this issue and I have been unable to figure out how to print it. I know as a variable you can do $stdout but whenever I print it (using pp, puts, or print), I cannot get the actual value of stdout.

I attached an image of one of my tests with a few of my different attempts (commented out at the moment).

Thanks for your help!

Screen Shot 2015-06-23 at 2.07.56 PM.png
1 comment
Comment actions Permalink


I'd suggest to ask this on rspec mailing list because it looks like rspec-related question.

Regards, Oleg.


Please sign in to leave a comment.