From: Eero Saynatkari Date: 2006-08-29T00:17:36+09:00 Subject: Re: Readline and StringIO David Vallner wrote: > Eero Saynatkari wrote: > > I was merely wondering if there is any reason for the >> T_FILE check in Readline (as opposed to a more permissive >> one) since that would be the easier solution. > > Change the check and see if there is a reason? > > Personally, I'd avoid unit-testing with simulating interactive input. > Unless you're unit-testing the readline library / binding. Maybe you're > missing an abstraction layer between user input and your program logic? I am actually trying to test output which is also not possible. > At least I thought unit testing was supposed to test the core logic > modules, where you can just feed them with your specific data or > environment. Testing at the interface level doesn't seem like > unit-testing to me, and you probably want tools like expect to get > decent coverage from that approach. I dunno, I see nothing wrong with testing with correct/incorrect IO for those parts which access the streams directly. The alternative would be using some type of mocking but, well, that would not work either. > David Vallner -- Posted via http://www.ruby-forum.com/.