[rspec-users] STDOUT.should_receive(:puts).with Works *** (:print) fails

Charles Thornton lists at ruby-forum.com
Sat May 11 03:36:43 UTC 2013

I use:  STDOUT.should_receive(:puts).with...... many times in RSPEC

 However, I have a couple of "do you want(Y/N)?" where I use 'print'

and apparently  ..(:print).with... does not work.  I can change 'print'
to 'puts' and it works perfectly.

How do I test :print and ...getch("y") for input???

Any help would be appreciated!!

 Chuck T.

 EMAIL:   admin at hawthorne-press.com

Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list