Forum: Ferret mocking/stubbing ferret

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
John B. (Guest)
on 2007-01-08 23:44
(Received via mailing list)
Does anyone have an experience with mocking/stubbing ferret, in order
to increase speed? I've taken a look at what it might entail and from
what I've seen it would have to be a pretty elaborate system. But I
am not very experienced with mocking/stubbing.

Any tips much appreciated.

John
Levent A. (Guest)
on 2007-11-06 12:31
I assume you are talking about test performance? Rails? acts_as_ferret?

In our rails controller tests we basically test that the controller is
calling ferret with the correct query

For example let's say we have the model Job

class Job
 acts_as_ferret {blah}
end

in the test

Job.expects(:find_by_contents).with("keyword").returns(whatever)
post :search, :query => "keyword"
This topic is locked and can not be replied to.