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:
parent
a8057669ff
commit
1db7c9cf4a
1 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue