[rspec-users] specing class methods

Josh Knowles joshknowles at gmail.com
Fri Apr 13 18:03:08 EDT 2007


On 4/13/07, Scott Taylor <mailing_lists at railsnewbie.com> wrote:

> Autotest.run.should_receive(:new).should_receive(:run)



Is this what you're trying to do?

autotest = mock('autotest')
autotest.should_receive(:run)

Autotest.should_receive(:new).and_return(autotest)



-- 
Josh Knowles
joshknowles at gmail.com
http://joshknowles.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070413/6da084c3/attachment.html 


More information about the rspec-users mailing list