[rspec-users] How much test data to use in specs

David Chelimsky dchelimsky at gmail.com
Thu Aug 28 08:31:30 EDT 2008

On Wed, Aug 27, 2008 at 2:24 PM, Nick Hoffman <nick at deadorange.com> 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
>>    ...
>>  end
>> end
>> That makes the output very verbose, but the spec file is easy to grok.
> 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 improvements, I'd love to hear them.

Hey Nick,

I can definitely see some value in this, though there are a few things
that I'd do differently. Have a look at http://pastie.org/261642 and
let me know if you have any questions/comments. The only thing I'm not
sure about is the actual method name - it's not speaking to me, but
I'm at a loss for a better one. Maybe after some coffee ...


> Cheers,
> Nick

More information about the rspec-users mailing list