thoughtbot/shoulda-matchers — pull request #312 by MDaubs (2013-06-29 05:47:53+00:00)
Title: Add have_secure_password matcher w/behavior verification

I didn't realize that there was already an open PR for this, however I think this version addresses comments from the original #42 that #304 does not. This adds a `have_secure_password` matcher for Rails >= 3.1. It also works fine in Rails 4.0 but does not verify the newly-added :validations option.

I was originally also checking for the presence and confirmation validations that `ActiveModel::SecurePassword` adds but since it was delegating to `ValidatesConfirmationOfMatcher`, and that appears to be broken in Rails 4 at the moment, it made this implementation fail in Rails 4.