From 127a2eea63713407dfde5e7ea06939d76e3addfe Mon Sep 17 00:00:00 2001 From: Vipul A M Date: Thu, 11 Apr 2013 18:08:46 +0530 Subject: cleanup statement cache test --- activerecord/test/cases/statement_cache_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/activerecord/test/cases/statement_cache_test.rb b/activerecord/test/cases/statement_cache_test.rb index a8c97cccd4..76da49707f 100644 --- a/activerecord/test/cases/statement_cache_test.rb +++ b/activerecord/test/cases/statement_cache_test.rb @@ -23,7 +23,7 @@ module ActiveRecord def test_statement_cache_with_nil_statement_raises_error assert_raise(ArgumentError) do - cache = ActiveRecord::StatementCache.new do + ActiveRecord::StatementCache.new do nil end end @@ -36,7 +36,7 @@ module ActiveRecord salty = Liquid.create(name: 'salty') molecule = salty.molecules.create(name: 'dioxane') - electron = molecule.electrons.create(name: 'lepton') + molecule.electrons.create(name: 'lepton') liquids = cache.execute assert_equal "salty", liquids[0].name @@ -47,13 +47,13 @@ module ActiveRecord Book.where(name: "my book") end - for i in 0..2 do + 3.times do Book.create(name: "my book") end first_books = cache.execute - for i in 0..2 do + 3.times do Book.create(name: "my book") end -- cgit v1.2.3