Skip to content

Instantly share code, notes, and snippets.

@ericchen
Created May 26, 2011 01:24
Show Gist options
  • Save ericchen/992366 to your computer and use it in GitHub Desktop.
Save ericchen/992366 to your computer and use it in GitHub Desktop.
manully raise exception for rspec
User.stub!(:create!).and_raise(Mongoid::Errors::Validations)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment