From 5a9dc1231c337f20a53e22d01dcddf7953ec549d Mon Sep 17 00:00:00 2001 From: Marcel Molina Date: Tue, 8 May 2007 03:57:28 +0000 Subject: 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 --- .../lib/active_support/core_ext/test/difference.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'activesupport/lib') 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 -- cgit v1.2.3