On Apr 18, 2007, at 8:02 AM, aslak hellesoy wrote:
> On 4/18/07, Scott Taylor <mailing_lists at railsnewbie.com> wrote:
>>
>> How would I spec a call to exit? I can''t seem to stub it -
rspec
>> throws an error.
>>
>
> I''m not sure what "speccing a call to exit" means
because it''s too
> vague. Is the spec calling exit or is the code under test calling exit
> (perhaps as the result of calling some other method from the spec)?
>
> What behaviour are you expecting in what situation?
The behavior is to call exit when a certain exception is raised (for
instance, an Interrupt signal).
I''m actually going to eliminate this from my code, as I can just call
break instead (I''m breaking from an otherwise infinite loop). Just
to satisfy my curiosity, though, what are your thoughts?
Thanks,
Scott