[rspec-users] Mocking Kernel.system or Kernel.` for external application calls

2008-10-10 Thread Joey Geiger
I'm running into an issue while trying to test the execution of some external applications called from inside my models. class OmssaPacker def self.run_omssa_aws2ez2_unix(parameters) system("perl /pipeline/vipdac/lib/omssa_aws2ez2_unix.pl #{parameters}") end end ..spec code... describe

Re: [rspec-users] Mocking Kernel.system or Kernel.` for external application calls

2008-10-10 Thread Joey Geiger
Thank you, it's now working as expected. I was basing the code on what I had seen before, with examples of people stubbing Kernel.system, so I wasn't thinking about just using the object itself. ___ rspec-users mailing list rspec-users@rubyforge.org http

[rspec-users] dealing with a retry inside of a rescue block

2008-11-18 Thread Joey Geiger
I'm trying to spec this method which is attempting to connect to beanstalkd message queue. I'm trying to figure out how to spec this so it catches the retry without actually retrying the block forever. Any help would be appreciated. def get_message(name, peek=false) begin if peek