[rspec-users] spec'ing validates_uniqueness_of :whatever
Pat Maddox
pergesu at gmail.com
Fri Apr 4 02:02:57 EDT 2008
On Thu, Apr 3, 2008 at 10:41 PM, Steven Baker <steven at stevenrbaker.com> wrote:
> If you were to write an example that creates two models, and ensures
> that the duplicate errored appropriately, my "rule" is violated. Each
> of your examples is then specifying the behaviour of the
> validates_uniqueness_of method, which you didn't write.
I don't really agree with this. The desired behavior is to disallow
two records with the same data. v_u_o is simply a quick and easy
means to that end.
Pat
More information about the rspec-users
mailing list