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.
D0347a9af192d23f47056bd253743dcf?d=identicon&s=25 John Bachir (Guest)
on 2007-01-08 22: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
2e47e5cb83bfb29e87c6aa1495b9837a?d=identicon&s=25 Levent Ali (levent)
on 2007-11-06 11: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.