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.

FIXTURE
********
article_001:
  id:                               1
  title:                            some valid article title
  body:                           This is a valid article entry with
some images and stuff.

FUNCTIONAL TEST
******************
def test_search
  get :search, :q => "some valid article title"
  assert_equal 1, assigns(:articles).size
end

MODEL
*******
  acts_as_ferret( { :fields => { 'title' => { :boost => 2 },
                                 'body' => { :boost => 1.5 },
                                 'ferret_index_article_comments' => {
:boost => 1 },
                                 'ferret_index_article_image_captions'
=> { :boost => 1.5 } } },
                  { :analyzer =>
Ferret::Analysis::StandardAnalyzer.new([nil]) } )

-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to