aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorMarcel Molina <marcel@vernix.org>2007-05-08 03:57:28 +0000
committerMarcel Molina <marcel@vernix.org>2007-05-08 03:57:28 +0000
commit5a9dc1231c337f20a53e22d01dcddf7953ec549d (patch)
tree5d8023c8071e63400bcc47392323538b44c63406 /activesupport/lib
parent689b529ea82b2375ee3f743eb82da9b83e0d00ff (diff)
downloadrails-5a9dc1231c337f20a53e22d01dcddf7953ec549d.tar.gz
rails-5a9dc1231c337f20a53e22d01dcddf7953ec549d.tar.bz2
rails-5a9dc1231c337f20a53e22d01dcddf7953ec549d.zip
Fix typo and clarify code examples in documentation for assert_difference.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6694 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/core_ext/test/difference.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/activesupport/lib/active_support/core_ext/test/difference.rb b/activesupport/lib/active_support/core_ext/test/difference.rb
index 65dae3469b..7b22b32d26 100644
--- a/activesupport/lib/active_support/core_ext/test/difference.rb
+++ b/activesupport/lib/active_support/core_ext/test/difference.rb
@@ -4,19 +4,19 @@ module Test #:nodoc:
# Test numeric difference between the return value of an expression as a result of what is evaluated
# in the yielded block.
#
- # assert_difference 'Post.count' do
- # post :create, :post => {...}
+ # assert_difference 'Article.count' do
+ # post :create, :article => {...}
# end
#
- # An arbitrary expression is passed in an evaluated.
+ # An arbitrary expression is passed in and evaluated.
#
- # assert_difference 'assigns(:post).comments(:reload).size' do
+ # assert_difference 'assigns(:article).comments(:reload).size' do
# post :create, :comment => {...}
# end
#
- # An arbitrary positive or negative difference can be specified. The default is 1.
+ # An arbitrary positive or negative difference can be specified. The default is +1.
#
- # assert_difference 'Post.count', -1 do
+ # assert_difference 'Article.count', -1 do
# post :delete, :id => ...
# end
def assert_difference(expression, difference = 1, &block)
@@ -29,8 +29,8 @@ module Test #:nodoc:
# Assertion that the numeric result of evaluating an expression is not changed before and after
# invoking the passed in block.
#
- # assert_no_difference 'Post.count' do
- # post :create, :post => invalid_attributes
+ # assert_no_difference 'Article.count' do
+ # post :create, :article => invalid_attributes
# end
def assert_no_difference(expression, &block)
assert_difference expression, 0, &block