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
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”