lib/shoulda/macros.rb in rmm5t-shoulda-2.0.5 vs lib/shoulda/macros.rb in rmm5t-shoulda-2.0.6
- old
+ new
@@ -9,11 +9,11 @@
# assertion, but supports more than just numeric values. See also
# should_not_change.
#
# Example:
#
- # context "Creating a post"
+ # context "Creating a post" do
# setup { Post.create }
# should_change "Post.count", :by => 1
# end
#
# As shown in this example, the <tt>:by</tt> option expects a numeric
@@ -51,10 +51,10 @@
# of an expression that is run before and after the current setup block
# is run. This is the logical opposite of should_change.
#
# Example:
#
- # context "Updating a post"
+ # context "Updating a post" do
# setup { @post.update_attributes(:title => "new") }
# should_not_change "Post.count"
# end
def should_not_change(expression)
expression_eval = lambda { eval(expression) }