Skip to content
Browse files

Merge pull request #10174 from vipulnsward/cleanup_caching_test

Cleanup statement cache test
  • Loading branch information...
2 parents f64ba87 + 127a2ee commit 8bb8ba127b6319c089487e40cb57a0c03c5830e5 @carlosantoniodasilva carlosantoniodasilva committed Apr 11, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 activerecord/test/cases/statement_cache_test.rb
View
8 activerecord/test/cases/statement_cache_test.rb
@@ -23,7 +23,7 @@ def test_statement_cache_with_simple_statement
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 @@ def test_statement_cache_with_complex_statement
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 @@ def test_statement_cache_values_differ
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

0 comments on commit 8bb8ba1

Please sign in to comment.
Something went wrong with that request. Please try again.