1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

fixing "test_any_should_not_load_results" so it doesn't depend on latest version of Mocha

Signed-off-by: Michael Koziarski <michael@koziarski.com>
This commit is contained in:
Ryan Bates 2008-08-07 19:33:44 -07:00 committed by Michael Koziarski
parent a8057669ff
commit 1db7c9cf4a

View file

@ -186,9 +186,10 @@ class NamedScopeTest < ActiveRecord::TestCase
def test_any_should_not_load_results
topics = Topic.base
assert_queries(1) do
topics.expects(:empty?).returns(true)
assert !topics.any?
assert_queries(2) do
topics.any? # use count query
topics.collect # force load
topics.any? # use loaded (no query)
end
end