diff options
author | Ryan Bates <ryan@railscasts.com> | 2008-08-07 19:33:44 -0700 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-08-08 10:33:29 +0200 |
commit | 1db7c9cf4a153bbc9001d69508f58b3e8b288c34 (patch) | |
tree | a1b2e1e5fe32f4550ae787127190a72a87f070b3 /activerecord/test | |
parent | a8057669ff6ba11e228fc73eef7390b826d0de25 (diff) | |
download | rails-1db7c9cf4a153bbc9001d69508f58b3e8b288c34.tar.gz rails-1db7c9cf4a153bbc9001d69508f58b3e8b288c34.tar.bz2 rails-1db7c9cf4a153bbc9001d69508f58b3e8b288c34.zip |
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>
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/named_scope_test.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/activerecord/test/cases/named_scope_test.rb b/activerecord/test/cases/named_scope_test.rb index e21ffbbdba..7bd712e11e 100644 --- a/activerecord/test/cases/named_scope_test.rb +++ b/activerecord/test/cases/named_scope_test.rb @@ -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 |