<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
Hi all, <div><br><div><div>On 25 Aug 2008, at 17:53, Nick Hoffman wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">At the moment, my plan is to spec out the following possibilities. A property is invalid if its address:</font></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">1) doesn't begin with a digit;</font></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">2) is shorter than 2 characters;</font></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">3) is longer than 128 characters;</font></p> </blockquote></div><div><br></div><div><br></div><div>Personally I think that if those three points are your specification then your RSpec should match that.  </div><div><br></div><div>So: </div><div>* it "should not begin with a digit", </div><div>* it "should not be shorter than 2 characters", </div><div>* it "should not be longer than 128 characters" and </div><div>* it "should allow valid addresses" (this is for clarity, so you have an example of a valid address in your documentation).  </div><div><br></div><div>If your regex allows or disallows more or less than those four clauses then your specification does not match your implementation.  </div><div><br></div><div>Baz</div><br><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: 'Helvetica Neue'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: 'Helvetica Neue'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: 'Gill Sans'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: 'Helvetica Neue'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="font-family: Helvetica; "><font class="Apple-style-span" size="2"><span class="Apple-style-span" style="font-size: 10px; font-family: Helvetica; "><span class="Apple-style-span" style="font-size: 10px; font-family: Helvetica; "><span class="Apple-style-span" style="font-size: 10px; font-family: Helvetica; "><span class="Apple-style-span" style="font-size: 10px; font-family: Helvetica; "><span class="Apple-style-span" style="font-family: Helvetica; font-size: 10px; "><font class="Apple-style-span" color="#800000"><span class="Apple-style-span" style="color: rgb(128, 0, 0); font-family: Helvetica; font-size: 10px; "><span class="Apple-style-span" style="color: rgb(128, 0, 0); font-family: Helvetica; font-size: 10px; "><span class="Apple-style-span" style="color: rgb(128, 0, 0); font-family: Helvetica; font-size: 10px; "><span class="Apple-style-span" style="color: rgb(128, 0, 0); font-size: 10px; "><span class="Apple-style-span" style="color: rgb(128, 0, 0); font-size: 10px; "><span class="Apple-style-span" style="color: rgb(128, 0, 0); font-size: 10px; "><span class="Apple-style-span" style="color: rgb(128, 0, 0); font-size: 10px; ">Rahoul Baruah</span></span></span></span></span></span></span></font></span></span></span></span></span></font></div><div style="font-family: Helvetica; "><font class="Apple-style-span" color="#7F7F7F" size="2"><span class="Apple-style-span" style="font-size: 10px; color: rgb(127, 127, 127); font-family: Helvetica; "><span class="Apple-style-span" style="color: rgb(127, 127, 127); font-family: Helvetica; font-size: 10px; "><span class="Apple-style-span" style="color: rgb(127, 127, 127); font-size: 10px; "><span class="Apple-style-span" style="color: rgb(127, 127, 127); font-size: 10px; "><i style="color: rgb(127, 127, 127); font-size: 10px; font-style: italic; "><span class="Apple-style-span" style="color: rgb(127, 127, 127); font-size: 10px; font-style: italic; ">Web design and development</span></i><span class="Apple-style-span" style="color: rgb(127, 127, 127); font-size: 10px; "><span class="Apple-style-span" style="color: rgb(127, 127, 127); font-size: 10px; ">: <a href="http://www.3hv.co.uk">http://www.3hv.co.uk</a>/</span></span></span></span></span></span></font></div><div style="font-family: Helvetica; "><font class="Apple-style-span" color="#7F7F7F" size="2"><span class="Apple-style-span" style="font-size: 10px; color: rgb(127, 127, 127); font-family: Helvetica; "><span class="Apple-style-span" style="color: rgb(127, 127, 127); font-size: 10px; font-family: Helvetica; "><span class="Apple-style-span" style="color: rgb(127, 127, 127); font-size: 10px; font-family: Helvetica; "><span class="Apple-style-span" style="color: rgb(127, 127, 127); font-size: 10px; font-family: Helvetica; "><span class="Apple-style-span" style="color: rgb(127, 127, 127); font-family: Helvetica; font-size: 10px; "><span class="Apple-style-span" style="color: rgb(127, 127, 127); font-family: Helvetica; font-size: 10px; "><span class="Apple-style-span" style="color: rgb(127, 127, 127); font-family: Helvetica; font-size: 10px; "><span class="Apple-style-span" style="color: rgb(127, 127, 127); font-family: Helvetica; font-size: 10px; "><span class="Apple-style-span" style="color: rgb(127, 127, 127); font-size: 10px; "><span class="Apple-style-span" style="color: rgb(127, 127, 127); font-size: 10px; "><span class="Apple-style-span" style="color: rgb(127, 127, 127); font-size: 10px; "><span class="Apple-style-span" style="color: rgb(127, 127, 127); font-size: 10px; ">Nottingham Forest: <a href="http://www.eighteensixtyfive.co.uk">http://www.eighteensixtyfive.co.uk</a>/</span></span></span></span></span></span></span></span></span></span></span></span></font></div><div style="font-family: Helvetica; "><font class="Apple-style-span" color="#7F7F7F" size="2"><span class="Apple-style-span" style="font-size: 10px; color: rgb(127, 127, 127); font-family: Helvetica; ">Serious Rails Hosting: <a href="http://www.brightbox.co.uk">http://www.brightbox.co.uk</a>/</span></font></div><div style="font-family: Helvetica; "><font class="Apple-style-span" color="#7F7F7F" size="2"><span class="Apple-style-span" style="font-size: 10px; ">Lifecast: <a href="http://www.madeofstone.net">http://www.madeofstone.net</a>/</span></font></div><div style="font-family: Helvetica; "><font class="Apple-style-span" color="#7F7F7F" size="2"><span class="Apple-style-span" style="font-size: 10px; color: rgb(127, 127, 127); font-family: Helvetica; "><br class="khtml-block-placeholder"></span></font></div><div style="font-family: Helvetica; "><font class="Apple-style-span" color="#7F7F7F" size="2"><span class="Apple-style-span" style="font-size: 10px; color: rgb(127, 127, 127); font-family: Helvetica; "><br class="khtml-block-placeholder"></span></font></div><div style="font-family: Helvetica; "><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></span></span></span></span></span></span></span></span></span></span><br class="Apple-interchange-newline"></span> </div><br></div></body></html>