Max Williams
2009-02-06 11:13:43 UTC
I'm trying to write a test for a method that uses a ferret search, but
can't validate that the results are a_a_f results because my class test
doesn't work. Can anyone set me straight? Here's some console
experimentation that shows the root of the problem.
...
]
What class should i be testing against, if it's not
ActsAsFerret::SearchResults? If i do type on the results i just get
Array.
can't validate that the results are a_a_f results because my class test
doesn't work. Can anyone set me straight? Here's some console
experimentation that shows the root of the problem.
users = User.find_with_ferret("max", :per_page => 2)
=> [#<User ......
]
users.size
=> 2users.next_page #call a ferret-results-specific method
=> 2users.kind_of?(ActsAsFerret::SearchResults)
=> falseWhat class should i be testing against, if it's not
ActsAsFerret::SearchResults? If i do type on the results i just get
Array.
--
Posted via http://www.ruby-forum.com/.
Posted via http://www.ruby-forum.com/.