aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/lazy_load_hooks_test.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-08-06 19:38:33 +0200
committerXavier Noria <fxn@hashref.com>2016-08-06 19:38:33 +0200
commit5c315a8fa6296904f5e0ba8da919fc395548cf98 (patch)
treec20da9c73b5db9caa8c2aa711955ed17f01d396d /activesupport/test/lazy_load_hooks_test.rb
parentd22e522179c1c90e658c3ed0e9b972ec62306209 (diff)
downloadrails-5c315a8fa6296904f5e0ba8da919fc395548cf98.tar.gz
rails-5c315a8fa6296904f5e0ba8da919fc395548cf98.tar.bz2
rails-5c315a8fa6296904f5e0ba8da919fc395548cf98.zip
modernizes hash syntax in activesupport
Diffstat (limited to 'activesupport/test/lazy_load_hooks_test.rb')
-rw-r--r--activesupport/test/lazy_load_hooks_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/test/lazy_load_hooks_test.rb b/activesupport/test/lazy_load_hooks_test.rb
index 1664ee8c92..d08efa429a 100644
--- a/activesupport/test/lazy_load_hooks_test.rb
+++ b/activesupport/test/lazy_load_hooks_test.rb
@@ -63,7 +63,7 @@ class LazyLoadHooksTest < ActiveSupport::TestCase
def test_hook_with_yield_true
i = 0
- ActiveSupport.on_load(:contextual_yield, :yield => true) do |obj|
+ ActiveSupport.on_load(:contextual_yield, yield: true) do |obj|
i += obj.incr + incr_amt
end
assert_equal 0, i
@@ -75,7 +75,7 @@ class LazyLoadHooksTest < ActiveSupport::TestCase
i = 0
ActiveSupport.run_load_hooks(:contextual_yield_after, FakeContext.new(2))
assert_equal 0, i
- ActiveSupport.on_load(:contextual_yield_after, :yield => true) do |obj|
+ ActiveSupport.on_load(:contextual_yield_after, yield: true) do |obj|
i += obj.incr + incr_amt
end
assert_equal 7, i