Skip to content

Instantly share code, notes, and snippets.

@mtkd
Last active December 27, 2015 19:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mtkd/7377925 to your computer and use it in GitHub Desktop.
Save mtkd/7377925 to your computer and use it in GitHub Desktop.
Test exception message
exc = assert_raises Mongoid::Errors::Validations do
subject.do_something
end
assert exc.message.include?("something failed")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment