Skip to content

Instantly share code, notes, and snippets.

@jferris
Created August 5, 2009 21:40
Show Gist options
  • Save jferris/162992 to your computer and use it in GitHub Desktop.
Save jferris/162992 to your computer and use it in GitHub Desktop.
# post.class.should have_received(:find).with(post.to_param)
should find(post)
# Post.should have_received(:new).with(post_attrs)
should build(Post, post_attrs)
# Post.should have_received(:new).with(post_attrs)
# post.should have_received(:save)
should build_and_save(Post, post_attrs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment