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.
SearchResults is a really thin wrapper around a standard Ruby Array
instance. If you really want to check it’s a SearchResults instance
and not something else, check for Array and whether it behaves like it
should by looking at the ‘special’ methods the SearchResults class
adds, maybe like this: