aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/testing/assertions.rb
diff options
context:
space:
mode:
authorFrancesco Rodriguez <lrodriguezsanc@gmail.com>2012-09-14 22:57:38 -0500
committerFrancesco Rodriguez <lrodriguezsanc@gmail.com>2012-09-14 22:57:38 -0500
commitb0e943381becdb882c93fe699e324bf0e6c99806 (patch)
tree1ead539a74d3ea101421564280e667ba6f934e8a /activesupport/lib/active_support/testing/assertions.rb
parentd48163c65d1f6f4cec433e2b5fc785246d03c4b6 (diff)
downloadrails-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/assertions.rb')
-rw-r--r--activesupport/lib/active_support/testing/assertions.rb8
1 files changed, 5 insertions, 3 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