diff options
author | Jon Leighton <j@jonathanleighton.com> | 2012-04-26 18:32:55 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2012-04-26 18:32:55 +0100 |
commit | 75f03eca753f1e835409a80db1f54f716ef48d18 (patch) | |
tree | 6ef084ea2ee7b44c574096274ab6d5fa7a308235 /activerecord/test/cases/query_cache_test.rb | |
parent | b30996307d3b8d0d519c7ddcfa28fdeed428b602 (diff) | |
download | rails-75f03eca753f1e835409a80db1f54f716ef48d18.tar.gz rails-75f03eca753f1e835409a80db1f54f716ef48d18.tar.bz2 rails-75f03eca753f1e835409a80db1f54f716ef48d18.zip |
remove calls to find(:first), find(:last) and find(:all)
Diffstat (limited to 'activerecord/test/cases/query_cache_test.rb')
-rw-r--r-- | activerecord/test/cases/query_cache_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/query_cache_test.rb b/activerecord/test/cases/query_cache_test.rb index d93478513b..a712e5f689 100644 --- a/activerecord/test/cases/query_cache_test.rb +++ b/activerecord/test/cases/query_cache_test.rb @@ -96,7 +96,7 @@ class QueryCacheTest < ActiveRecord::TestCase def test_cache_clear_after_close mw = ActiveRecord::QueryCache.new lambda { |env| - Post.find(:first) + Post.first [200, {}, nil] } body = mw.call({}).last @@ -233,8 +233,8 @@ class QueryCacheExpiryTest < ActiveRecord::TestCase def test_cache_is_expired_by_habtm_update ActiveRecord::Base.connection.expects(:clear_query_cache).times(2) ActiveRecord::Base.cache do - c = Category.find(:first) - p = Post.find(:first) + c = Category.first + p = Post.first p.categories << c end end |