aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/notifications/instrumenter_test.rb
diff options
context:
space:
mode:
authorEileen M. Uchitelle <eileencodes@users.noreply.github.com>2019-03-22 14:02:38 -0400
committerGitHub <noreply@github.com>2019-03-22 14:02:38 -0400
commit75f19b5deb02410ea41a934d3bc822cec106fa6c (patch)
tree25de7f6604622c82d66d5016a510a96fc769ef2a /activesupport/test/notifications/instrumenter_test.rb
parentf40860800c231ecd1daef6cf6b5a8a8eda76478d (diff)
parent7237c7be74b09cd951ff000afb4087313e5c0025 (diff)
downloadrails-75f19b5deb02410ea41a934d3bc822cec106fa6c.tar.gz
rails-75f19b5deb02410ea41a934d3bc822cec106fa6c.tar.bz2
rails-75f19b5deb02410ea41a934d3bc822cec106fa6c.zip
Merge pull request #35705 from alimi/instrumenter-block-optional
Update AS::Notifications::Instrumenter#instrument
Diffstat (limited to 'activesupport/test/notifications/instrumenter_test.rb')
-rw-r--r--activesupport/test/notifications/instrumenter_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/test/notifications/instrumenter_test.rb b/activesupport/test/notifications/instrumenter_test.rb
index d5c9e82e9f..9729ad5c89 100644
--- a/activesupport/test/notifications/instrumenter_test.rb
+++ b/activesupport/test/notifications/instrumenter_test.rb
@@ -44,6 +44,12 @@ module ActiveSupport
assert_equal Hash[result: 2], payload
end
+ def test_instrument_works_without_a_block
+ instrumenter.instrument("no.block", payload)
+ assert_equal 1, notifier.finishes.size
+ assert_equal "no.block", notifier.finishes.first.first
+ end
+
def test_start
instrumenter.start("foo", payload)
assert_equal [["foo", instrumenter.id, payload]], notifier.starts