<br><br><div><span class="gmail_quote">On 5/27/07, <b class="gmail_sendername">David Chelimsky</b> &lt;<a href="mailto:dchelimsky@gmail.com">dchelimsky@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><br>How does that verify that a person will reject a password length of 4 or 41?</blockquote><div><br><br>I have compiled a collection of rspec matchers to be used when testing rails validations: <a href="http://svn.integrumtech.com/public/plugins/rspec_on_rails_matchers">
http://svn.integrumtech.com/public/plugins/rspec_on_rails_matchers</a><br><br>If you use this library then you would spec out the password length as follows:<br><br>it do<br>&nbsp; @user.should validate_length_of(:password, 5..40)
<br>end<br><br>Behind the scenes this matcher attempts to set the password to a value outside of the range and then calls valid?<br><br>I obviously need to finish this plugin, and get it properly documented, but in the mean time comments/suggestions welcome/
<br><br>Josh<br></div><br></div><br><br clear="all"><br>-- <br>Josh Knowles<br><a href="mailto:joshknowles@gmail.com">joshknowles@gmail.com</a><br><a href="http://joshknowles.com">http://joshknowles.com</a>