From b0e943381becdb882c93fe699e324bf0e6c99806 Mon Sep 17 00:00:00 2001 From: Francesco Rodriguez Date: Fri, 14 Sep 2012 22:57:38 -0500 Subject: update AS/notifications and AS/testing docs [ci skip] --- activesupport/lib/active_support/notifications/instrumenter.rb | 2 +- activesupport/lib/active_support/testing/assertions.rb | 8 +++++--- activesupport/lib/active_support/testing/performance.rb | 8 ++++---- 3 files changed, 10 insertions(+), 8 deletions(-) (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/notifications/instrumenter.rb b/activesupport/lib/active_support/notifications/instrumenter.rb index 78d0397f1f..ab0b162ee0 100644 --- a/activesupport/lib/active_support/notifications/instrumenter.rb +++ b/activesupport/lib/active_support/notifications/instrumenter.rb @@ -13,7 +13,7 @@ module ActiveSupport # 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 diff --git a/activesupport/lib/active_support/testing/assertions.rb b/activesupport/lib/active_support/testing/assertions.rb index ee1a647ed8..8466049e20 100644 --- a/activesupport/lib/active_support/testing/assertions.rb +++ b/activesupport/lib/active_support/testing/assertions.rb @@ -31,7 +31,7 @@ module ActiveSupport # # 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 @@ module ActiveSupport assert_difference expression, 0, message, &block end - # Test if an expression is blank. Passes if object.blank? is +true+. + # Test if an expression is blank. Passes if object.blank? + # is +true+. # # assert_blank [] # => true # assert_blank [[]] # => [[]] is not blank @@ -90,7 +91,8 @@ module ActiveSupport assert object.blank?, message end - # Test if an expression is not blank. Passes if object.present? is +true+. + # Test if an expression is not blank. Passes if object.present? + # is +true+. # # assert_present({ data: 'x' }) # => true # assert_present({}) # => {} is blank diff --git a/activesupport/lib/active_support/testing/performance.rb b/activesupport/lib/active_support/testing/performance.rb index a6c57cd0ff..7102ffe2ed 100644 --- a/activesupport/lib/active_support/testing/performance.rb +++ b/activesupport/lib/active_support/testing/performance.rb @@ -70,7 +70,7 @@ module ActiveSupport end protected - # overridden by each implementation + # overridden by each implementation. def run_gc; end def run_warmup @@ -114,7 +114,7 @@ module ActiveSupport end end - # overridden by each implementation + # overridden by each implementation. class Profiler < Performer def time_with_block before = Time.now @@ -221,11 +221,11 @@ module ActiveSupport 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 -- cgit v1.2.3