[rspec-users] Checking for Range

Josh Knowles joshknowles at gmail.com
Sun May 27 17:40:21 EDT 2007

On 5/27/07, David Chelimsky <dchelimsky at gmail.com> wrote:
> How does that verify that a person will reject a password length of 4 or
> 41?

I have compiled a collection of rspec matchers to be used when testing rails

If you use this library then you would spec out the password length as

it do
  @user.should validate_length_of(:password, 5..40)

Behind the scenes this matcher attempts to set the password to a value
outside of the range and then calls valid?

I obviously need to finish this plugin, and get it properly documented, but
in the mean time comments/suggestions welcome/


Josh Knowles
joshknowles at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070527/085c9e16/attachment-0001.html 

More information about the rspec-users mailing list