Permalink
Browse files

fixing "test_any_should_not_load_results" so it doesn't depend on lat…

…est version of Mocha

Signed-off-by: Michael Koziarski <michael@koziarski.com>
  • Loading branch information...
ryanb authored and NZKoz committed Aug 8, 2008
1 parent a805766 commit 1db7c9cf4a153bbc9001d69508f58b3e8b288c34
Showing with 4 additions and 3 deletions.
  1. +4 −3 activerecord/test/cases/named_scope_test.rb
@@ -186,9 +186,10 @@ def test_empty_should_not_load_results
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

0 comments on commit 1db7c9c

Please sign in to comment.