thoughtbot/shoulda — Issue #197: Shoulda hits database instead of checking #validators collection
Author: fj
Created: 2011-12-26 20:27:55+00:00
State: open

`shoulda` could save time by simply introspecting the `#validators` collection, instead of trying to save the model. This would make all the validator specs much faster since they won't need to hit the database. (One possible exception is the uniqueness validator, since it's harder to tell whether something is unique or not without hitting the db, but this could be mocked appropriately.)

Additionally, checking the validators collection would fix a couple of other architecture issues, like Shoulda's current disregarding of custom messages on validators.