diff options
author | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2012-09-14 22:57:38 -0500 |
---|---|---|
committer | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2012-09-14 22:57:38 -0500 |
commit | b0e943381becdb882c93fe699e324bf0e6c99806 (patch) | |
tree | 1ead539a74d3ea101421564280e667ba6f934e8a /activesupport/lib/active_support/testing | |
parent | d48163c65d1f6f4cec433e2b5fc785246d03c4b6 (diff) | |
download | rails-b0e943381becdb882c93fe699e324bf0e6c99806.tar.gz rails-b0e943381becdb882c93fe699e324bf0e6c99806.tar.bz2 rails-b0e943381becdb882c93fe699e324bf0e6c99806.zip |
update AS/notifications and AS/testing docs [ci skip]
Diffstat (limited to 'activesupport/lib/active_support/testing')
-rw-r--r-- | activesupport/lib/active_support/testing/assertions.rb | 8 | ||||
-rw-r--r-- | activesupport/lib/active_support/testing/performance.rb | 8 |
2 files changed, 9 insertions, 7 deletions
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 <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 @@ module ActiveSupport 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 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 |