Well I get error as such:<br><br>1)<br>NoMethodError in &#39;Person should require a password within the range of 5..40 characters&#39;<br>undefined method `range&#39; for &quot;ruby_tuesday&quot;:String<br>./spec/models/person_spec.rb:43:
<br><br>and I have a feeling that they&#39;re right when they say string doesn&#39;t have a range method.<br><br>I thought this would work:<br>person.password.length.should == (5..40)<br><br>but doesn&#39;t look so<br><br>
1)<br>ArgumentError in &#39;Person should require a password within the range of 5..40 characters&#39;<br>wrong number of arguments (1 for 2)<br>./spec/models/person_spec.rb:43:in `initialize&#39;<br>./spec/models/person_spec.rb:43:in `new&#39;
<br>./spec/models/person_spec.rb:43:<br><br><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;">On 5/27/07, David Chelimsky &lt;<a href="mailto:dchelimsky@gmail.com">dchelimsky@gmail.com</a>
&gt; wrote:<br>&gt; On 5/27/07, Andrew WC Brown &lt;<a href="mailto:omen.king@gmail.com">omen.king@gmail.com</a>&gt; wrote:<br>&gt; &gt; how would you check for a range using rspec?<br>&gt; &gt;<br>&gt; &gt; person.password.range.should
 == Range.new(5..40) &lt;- this doesn&#39;t work<br>&gt;<br>&gt; The correct ruby syntax is Range.new(5, 40). So this should work:<br>&gt;<br>&gt; person.password.range.should == Range.new(5, 40)<br><br>OR ....<br><br>person.password.range.should
 == (5..40) #shortcut for Range.new(5, 40)<br><br><br>&gt;<br>&gt; Cheers,<br>&gt; David<br>&gt;<br>_______________________________________________<br>rspec-users mailing list<br><a href="mailto:rspec-users@rubyforge.org">
rspec-users@rubyforge.org</a><br><a href="http://rubyforge.org/mailman/listinfo/rspec-users">http://rubyforge.org/mailman/listinfo/rspec-users</a><br></blockquote></div><br>