Jens Kraemer wrote: > On Fri, Dec 01, 2006 at 08:56:20PM +0100, Mark wrote: >> Is there a way to reliably test the acts_as_ferret plugin using RoR >> functional tests? I load my fixtures and no matter what I do, the test >> won't return a result for what *should* be a query that returns results. >> Any help on this would be greatly appreciated. > > the problem is, that fixtures aren't loaded through active record, so no > ferret indexing can takes place. You have to call > Article.rebuild_index before running your tests (e.g. in setup), or > create your test data through active record inside your test case.
Right on Jens! That worked like a charm. I hadn't originally considered the fact that the fixtures aren't loaded through ActiveRecord. -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ferret-talk mailing list [email protected] http://rubyforge.org/mailman/listinfo/ferret-talk

