Re: [rspec-users] how to write spec for infinite loop?

2008-05-29 Thread zuo peng
Thanks guys. Both ways work perfectly. Regards, Peng Zuo ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] how to write spec for infinite loop?

2008-05-28 Thread zuo peng
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