On 2008-08-29, at 11:05, David Chelimsky wrote:
On Fri, Aug 29, 2008 at 9:03 AM, Nick Hoffman <[EMAIL PROTECTED]>
wrote:
On 2008-08-29, at 04:51, Joseph Wilk wrote:
I started using a set of methods to deal with this problem from
code in
the RadiantCMS(http://radiantcms.org/) project.
http
On Fri, Aug 29, 2008 at 9:03 AM, Nick Hoffman <[EMAIL PROTECTED]> wrote:
> On 2008-08-29, at 04:51, Joseph Wilk wrote:
>>
>> I started using a set of methods to deal with this problem from code in
>> the RadiantCMS(http://radiantcms.org/) project.
>>
>> http://gist.github.com/7936
>>
>> I stopped u
On 2008-08-29, at 04:51, Joseph Wilk wrote:
I started using a set of methods to deal with this problem from code
in
the RadiantCMS(http://radiantcms.org/) project.
http://gist.github.com/7936
I stopped using it after a while finding the tests did not read well.
Your method improves on Radiant
I started using a set of methods to deal with this problem from code in
the RadiantCMS(http://radiantcms.org/) project.
http://gist.github.com/7936
I stopped using it after a while finding the tests did not read well.
Your method improves on Radiant's which has tempted me to start testing
mode
On 2008-08-28, at 08:31, David Chelimsky wrote:
On Wed, Aug 27, 2008 at 2:24 PM, Nick Hoffman <[EMAIL PROTECTED]>
wrote:
On 2008-08-27, at 14:46, David Chelimsky wrote:
If you want to (not necessarily advising this, but I've seen it
done) you
can do this:
['!','(',')','&'].each do |char|
On Wed, Aug 27, 2008 at 2:24 PM, Nick Hoffman <[EMAIL PROTECTED]> wrote:
> On 2008-08-27, at 14:46, David Chelimsky wrote:
>>
>> If you want to (not necessarily advising this, but I've seen it done) you
>> can do this:
>>
>> ['!','(',')','&'].each do |char|
>> it "can't have #{char}" do
>>...
On 2008-08-27, at 14:46, David Chelimsky wrote:
If you want to (not necessarily advising this, but I've seen it
done) you can do this:
['!','(',')','&'].each do |char|
it "can't have #{char}" do
...
end
end
That makes the output very verbose, but the spec file is easy to grok.
Hi Da
We'd recommend that you start sending our your resumé. :)
cr
On Aug 27, 2008, at 1:55 PM, Jonathan Linowes wrote:
what if my office were at
Route 102 & Yahoo! Way, Suite #123
:)
On Aug 27, 2008, at 2:03 PM, Nick Hoffman wrote:
On 2008-08-27, at 12:57, Rahoul Baruah wrote:
For th
On Wed, Aug 27, 2008 at 12:05 PM, Nick Hoffman <[EMAIL PROTECTED]> wrote:
> On 2008-08-27, at 14:55, Jonathan Linowes wrote:
>
>> what if my office were at
>>
>>Route 102 & Yahoo! Way, Suite #123
>>
>> :)
>>
>
> Good point. Thinking about it again, there's probably not all that much
> need
On 2008-08-27, at 15:24, Nick Hoffman wrote:
Hi David. I ended up creating valid and invalid test data, as well
as a method to iterate over them and write the descriptions and
examples for me. You can have a look at it at http://pastie.org/
261175 . If you have any suggestions for improvement
On 2008-08-27, at 14:55, Jonathan Linowes wrote:
what if my office were at
Route 102 & Yahoo! Way, Suite #123
:)
Good point. Thinking about it again, there's probably not all that
much need to prevent addresses from having symbols such as !, &, ",
etc. If people really want to put
what if my office were at
Route 102 & Yahoo! Way, Suite #123
:)
On Aug 27, 2008, at 2:03 PM, Nick Hoffman wrote:
On 2008-08-27, at 12:57, Rahoul Baruah wrote:
For this, trivial, example, I find that far too verbose.
The "specification" says "if it is less than 2 characters then
i
On Wed, Aug 27, 2008 at 1:03 PM, Nick Hoffman <[EMAIL PROTECTED]> wrote:
> On 2008-08-27, at 12:57, Rahoul Baruah wrote:
>
>> For this, trivial, example, I find that far too verbose.
>>
>> The "specification" says "if it is less than 2 characters then invalid"
>> and "if it is more than 128 charac
On 2008-08-27, at 12:57, Rahoul Baruah wrote:
For this, trivial, example, I find that far too verbose.
The "specification" says "if it is less than 2 characters then
invalid" and "if it is more than 128 characters then invalid" .
But you are actually running three checks - "if less than 2",
On 27 Aug 2008, at 16:35, Matt Wynne wrote:
describe "when the address is less than two characters long" do
it "should be invalid" do ... end
end
describe "when the address is more than two characters long" do
describe "and the address is less than 128 characters long" do
On 25 Aug 2008, at 17:53, Nick Hoffman wrote:
At the moment, my plan is to spec out the following possibilities.
A property is invalid if its address:
1) doesn't begin with a digit;
2) is shorter than 2 characters;
3) is longer than 128 characters;
Personally I think that if those three p
Hi all,
On 25 Aug 2008, at 17:53, Nick Hoffman wrote:
At the moment, my plan is to spec out the following possibilities.
A property is invalid if its address:
1) doesn't begin with a digit;
2) is shorter than 2 characters;
3) is longer than 128 characters;
Personally I think that if those
On Mon, Aug 25, 2008 at 3:02 PM, Zach Dennis <[EMAIL PROTECTED]> wrote:
> On Mon, Aug 25, 2008 at 2:50 PM, Nick Hoffman <[EMAIL PROTECTED]> wrote:
>> On 2008-08-25, at 13:29, Zach Dennis wrote:
>>>
>>> I might do something like the following...
>>>
>>> describe Property, "email validations" do
>>>
On Mon, Aug 25, 2008 at 2:50 PM, Nick Hoffman <[EMAIL PROTECTED]> wrote:
> On 2008-08-25, at 13:29, Zach Dennis wrote:
>>
>> I might do something like the following...
>>
>> describe Property, "email validations" do
>>
>> ["[EMAIL PROTECTED]", "can't start with a digit",
>> "[EMAIL PROTECTED]",
On 2008-08-25, at 13:29, Zach Dennis wrote:
I might do something like the following...
describe Property, "email validations" do
["[EMAIL PROTECTED]", "can't start with a digit",
"[EMAIL PROTECTED]", "can't end with a digit"
].in_groups_of(2) do |email, description|
it description do
On Mon, Aug 25, 2008 at 12:53 PM, Nick Hoffman <[EMAIL PROTECTED]> wrote:
> I'm not sure how much test data I should be using in my specs. I'm writing
> specs for the Property model in my Rails app. Its "address" attribute is
> going to be validated with this regex:
> /\A\d+[a-z]? [-', a-z]{2,128}\
I'm not sure how much test data I should be using in my specs. I'm
writing specs for the Property model in my Rails app. Its "address"
attribute is going to be validated with this regex:
/\A\d+[a-z]? [-', a-z]{2,128}\Z/i
At the moment, my plan is to spec out the following possibilities. A
p
22 matches
Mail list logo