Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update AS/notifications and AS/testing docs [ci skip]

  • Loading branch information...
commit b0e943381becdb882c93fe699e324bf0e6c99806 1 parent d48163c
Francesco Rodriguez authored
View
2  activesupport/lib/active_support/notifications/instrumenter.rb
@@ -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
View
8 activesupport/lib/active_support/testing/assertions.rb
@@ -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
View
8 activesupport/lib/active_support/testing/performance.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.