From 18ab33cfc73471975190fe6e7240f105ada563fc Mon Sep 17 00:00:00 2001 From: Dan Croak Date: Tue, 30 Sep 2008 02:20:59 -0400 Subject: [PATCH] doc patch for should_change and should_not_change --- lib/shoulda/macros.rb | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/shoulda/macros.rb b/lib/shoulda/macros.rb index d8ca97c..a1810a3 100644 --- a/lib/shoulda/macros.rb +++ b/lib/shoulda/macros.rb @@ -12,10 +12,7 @@ module Macros # Example: # # context "Creating a post" - # setup do - # Post.create - # end - # + # setup { Post.create } # should_change "Post.count", :by => 1 # end # @@ -57,10 +54,7 @@ def should_change(expression, options = {}) # Example: # # context "Updating a post" - # setup do - # @post.update_attributes(:title => "new") - # end - # + # setup { @post.update_attributes(:title => "new") } # should_not_change "Post.count" # end def should_not_change(expression)