[rspec-users] how to write spec for infinite loop?
zuo peng
cn.peng.zuo at gmail.com
Thu May 29 02:25:52 EDT 2008
Hi,
I've got trouble when describe infinite loop.
code snippet:
def start_loop
while true
data = self.server.handle_client
if data
self.manager.dispatch(data)
end
end
end
without the loop, it is easy to test the logic.
but how can I describe it to tell the developer ( me :-) ) that there
should be an infinite loop inside.
thanks.
Regards,
Peng Zuo
More information about the rspec-users
mailing list