RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: taryneast
How would I build tests for the "find_products" method?
later versions of rails do not perform the search until you actually use the results. So every one of the calls in the code just builds a set of conditions.
it will not hit the database until you use "all" or "each" on "products"