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

Pat Maddox pergesu at gmail.com
Fri Oct 10 12:07:58 EDT 2008


> Kernel.should_receive(:system).with(/omssa_aws2ez2_unix\.pl/).and_return(true)
> is what you're looking for.

erm, that's a tad embarrasing :)  I copy/pasted your line without
editing it!  It should be:
OmssaPacker.should_receive(:system).with(/omssa_aws2ez2_unix\.pl/).and_return(true)

Pat


More information about the rspec-users mailing list