diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-09-21 19:14:55 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-21 19:14:55 +0900 |
commit | e0f4ccabb83a681397f98f216f5c1f65a5969bbe (patch) | |
tree | e15ab263484cedabf32a68a6ddc0e26aebb19aaf /activerecord/test | |
parent | 6c199967fc5c32155684b95628751eb1b5098e13 (diff) | |
parent | 4883a82251d498388a7186367d251f2185faf4c3 (diff) | |
download | rails-e0f4ccabb83a681397f98f216f5c1f65a5969bbe.tar.gz rails-e0f4ccabb83a681397f98f216f5c1f65a5969bbe.tar.bz2 rails-e0f4ccabb83a681397f98f216f5c1f65a5969bbe.zip |
Merge pull request #30671 from y-yagi/fix_interpreted_as_argument_prefix
Fix "warning: `*' interpreted as argument prefix"
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/instrumentation_test.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/test/cases/instrumentation_test.rb b/activerecord/test/cases/instrumentation_test.rb index 86ffe8b0d7..e6e8468757 100644 --- a/activerecord/test/cases/instrumentation_test.rb +++ b/activerecord/test/cases/instrumentation_test.rb @@ -8,7 +8,7 @@ module ActiveRecord def test_payload_name_on_load Book.create(name: "test book") subscriber = ActiveSupport::Notifications.subscribe("sql.active_record") do |*args| - event = ActiveSupport::Notifications::Event.new *args + event = ActiveSupport::Notifications::Event.new(*args) if event.payload[:sql].match "SELECT" assert_equal "Book Load", event.payload[:name] end @@ -20,7 +20,7 @@ module ActiveRecord def test_payload_name_on_create subscriber = ActiveSupport::Notifications.subscribe("sql.active_record") do |*args| - event = ActiveSupport::Notifications::Event.new *args + event = ActiveSupport::Notifications::Event.new(*args) if event.payload[:sql].match "INSERT" assert_equal "Book Create", event.payload[:name] end @@ -32,7 +32,7 @@ module ActiveRecord def test_payload_name_on_update subscriber = ActiveSupport::Notifications.subscribe("sql.active_record") do |*args| - event = ActiveSupport::Notifications::Event.new *args + event = ActiveSupport::Notifications::Event.new(*args) if event.payload[:sql].match "UPDATE" assert_equal "Book Update", event.payload[:name] end @@ -45,7 +45,7 @@ module ActiveRecord def test_payload_name_on_update_all subscriber = ActiveSupport::Notifications.subscribe("sql.active_record") do |*args| - event = ActiveSupport::Notifications::Event.new *args + event = ActiveSupport::Notifications::Event.new(*args) if event.payload[:sql].match "UPDATE" assert_equal "Book Update All", event.payload[:name] end @@ -58,7 +58,7 @@ module ActiveRecord def test_payload_name_on_destroy subscriber = ActiveSupport::Notifications.subscribe("sql.active_record") do |*args| - event = ActiveSupport::Notifications::Event.new *args + event = ActiveSupport::Notifications::Event.new(*args) if event.payload[:sql].match "DELETE" assert_equal "Book Destroy", event.payload[:name] end |