update AS/notifications and AS/testing docs [ci skip]
This commit is contained in:
parent
d48163c65d
commit
b0e943381b
@ -13,7 +13,7 @@ def initialize(notifier)
|
||||
|
||||
# Instrument the given block by measuring the time taken to execute it
|
||||
# and publish it. Notice that events get sent even if an error occurs
|
||||
# in the passed-in block
|
||||
# in the passed-in block.
|
||||
def instrument(name, payload={})
|
||||
@notifier.start(name, @id, payload)
|
||||
begin
|
||||
|
@ -31,7 +31,7 @@ module Assertions
|
||||
#
|
||||
# A lambda or a list of lambdas can be passed in and evaluated:
|
||||
#
|
||||
# assert_difference lambda { Article.count }, 2 do
|
||||
# assert_difference ->{ Article.count }, 2 do
|
||||
# post :create, article: {...}
|
||||
# end
|
||||
#
|
||||
@ -77,7 +77,8 @@ def assert_no_difference(expression, message = nil, &block)
|
||||
assert_difference expression, 0, message, &block
|
||||
end
|
||||
|
||||
# Test if an expression is blank. Passes if <tt>object.blank?</tt> is +true+.
|
||||
# Test if an expression is blank. Passes if <tt>object.blank?</tt>
|
||||
# is +true+.
|
||||
#
|
||||
# assert_blank [] # => true
|
||||
# assert_blank [[]] # => [[]] is not blank
|
||||
@ -90,7 +91,8 @@ def assert_blank(object, message=nil)
|
||||
assert object.blank?, message
|
||||
end
|
||||
|
||||
# Test if an expression is not blank. Passes if <tt>object.present?</tt> is +true+.
|
||||
# Test if an expression is not blank. Passes if <tt>object.present?</tt>
|
||||
# is +true+.
|
||||
#
|
||||
# assert_present({ data: 'x' }) # => true
|
||||
# assert_present({}) # => {} is blank
|
||||
|
@ -70,7 +70,7 @@ def run_test(metric, mode)
|
||||
end
|
||||
|
||||
protected
|
||||
# overridden by each implementation
|
||||
# overridden by each implementation.
|
||||
def run_gc; end
|
||||
|
||||
def run_warmup
|
||||
@ -114,7 +114,7 @@ def output_filename
|
||||
end
|
||||
end
|
||||
|
||||
# overridden by each implementation
|
||||
# overridden by each implementation.
|
||||
class Profiler < Performer
|
||||
def time_with_block
|
||||
before = Time.now
|
||||
@ -221,11 +221,11 @@ def benchmark
|
||||
end
|
||||
end
|
||||
|
||||
# overridden by each implementation
|
||||
# overridden by each implementation.
|
||||
def profile; end
|
||||
|
||||
protected
|
||||
# overridden by each implementation
|
||||
# overridden by each implementation.
|
||||
def with_gc_stats; end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user