thoughtbot/shoulda-matchers — pull request #377 by mcmire (2013-11-01 21:22:52+00:00)
Title: Remove #for from validation matchers

Certain classes for validation matchers support a #for method to set the
attribute that the matcher operates on. This is bad API design, because
it means that it is possible for a developer to accidentally (or
purposefully) never call #for and yet still use the matcher (which would
result in the matcher blowing up). Because of this, the attribute should
be required in the initializer for the matcher.

Related to this, #allow_value also supports an optional attribute, which
should be required. Simply moving `.for(...)` to the first argument to
\#allow_value wouldn't read very well, so we rename it to
\#allow_value_for.

---

Obviously, this is a **backward-incompatible change**, but I wanted to get you guys' opinion on this.