From: Ryan Davis Date: 2007-11-20T11:22:40+09:00 Subject: Re: exit call in script causes unit test to not run (newby) On Nov 19, 2007, at 17:05 , weathercoach@gmail.com wrote: > If I comment out the exit then my tests actually run. > > # Cleanup any transient files and directories and then exit > def script_clean > FileUtils.rm_rf(WORKDIR) if File.exists?(WORKDIR) > # Everything is tidy we should leave > exit > end so don't call exit. really. since it is the last thing you're doing anyways, what is it doing for you? Nothing. if you HAVE to call exit (and you don't), then do this in your tests: alias :old_exit :exit def exit # no end --- On second thought. Get rid of script_clean entirely. It is useless. Use Tempfile instead and you'll be happier.