[rspec-users] How much test data to use in specs
Nick Hoffman
nick at deadorange.com
Wed Aug 27 15:24:35 EDT 2008
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.
Cheers,
Nick
More information about the rspec-users
mailing list