aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/transactions_test.rb
diff options
context:
space:
mode:
authorErik Michaels-Ober <sferik@gmail.com>2014-10-27 17:28:53 +0100
committerErik Michaels-Ober <sferik@gmail.com>2014-11-29 11:53:24 +0100
commitd1374f99bf3090f3e659687c112ed0c5c0865cfb (patch)
treee87455ea620155254511180cc1f08c5544ed195c /activerecord/test/cases/transactions_test.rb
parent56e47cf66d2e3009b4032d0cd2ceb1a6e5e42573 (diff)
downloadrails-d1374f99bf3090f3e659687c112ed0c5c0865cfb.tar.gz
rails-d1374f99bf3090f3e659687c112ed0c5c0865cfb.tar.bz2
rails-d1374f99bf3090f3e659687c112ed0c5c0865cfb.zip
Pass symbol as an argument instead of a block
Diffstat (limited to 'activerecord/test/cases/transactions_test.rb')
-rw-r--r--activerecord/test/cases/transactions_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/transactions_test.rb b/activerecord/test/cases/transactions_test.rb
index 7160e8324d..72c07d8aea 100644
--- a/activerecord/test/cases/transactions_test.rb
+++ b/activerecord/test/cases/transactions_test.rb
@@ -13,7 +13,7 @@ class TransactionTest < ActiveRecord::TestCase
fixtures :topics, :developers, :authors, :posts
def setup
- @first, @second = Topic.find(1, 2).sort_by { |t| t.id }
+ @first, @second = Topic.find(1, 2).sort_by(&:id)
end
def test_persisted_in_a_model_with_custom_primary_key_after_failed_save
@@ -699,7 +699,7 @@ if current_adapter?(:PostgreSQLAdapter)
end
end
- threads.each { |t| t.join }
+ threads.each(&:join)
end
end
@@ -747,7 +747,7 @@ if current_adapter?(:PostgreSQLAdapter)
Developer.connection.close
end
- threads.each { |t| t.join }
+ threads.each(&:join)
end
assert_equal original_salary, Developer.find(1).salary