Skip to content

Instantly share code, notes, and snippets.

@ratnikov
Forked from rsl/gist:289924
Created January 29, 2010 17:31
Show Gist options
  • Save ratnikov/289926 to your computer and use it in GitHub Desktop.
Save ratnikov/289926 to your computer and use it in GitHub Desktop.
context "#increment" do
setup { @object.create! }
evaluate { @object.increment! :attribute }
should_change("attribute", :from => 0, :to => 1) { @object.attribute }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment