[rspec-users] STDIN gets method issue with rspec

gokul murthy railsthinker at gmail.com
Fri Jan 22 14:46:49 EST 2010


Hi,

I am new to rspec. I am trying to write a spec for a simple ruby program i.e

class First
def test
a = gets.chomp
return a
end
end

I have tried in different ways test method is called from the spec file. but
gets.chomp is not executing…

Please kindly advise me, how to write spec for this.

Thanks
Gokul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20100123/0d255b5a/attachment.html>


More information about the rspec-users mailing list