[rspec-users] How much test data to use in specs
nick at deadorange.com
Mon Aug 25 14:50:11 EDT 2008
On 2008-08-25, at 13:29, Zach Dennis wrote:
> I might do something like the following...
> describe Property, "email validations" do
> ["1invalid.email at example.com", "can't start with a digit",
> "invalid.email2 at example.com", "can't end with a digit"
> ].in_groups_of(2) do |email, description|
> it description do
> prop = Property.new :email => email
> prop.should_not be_valid
> prop.should have(1).error_on(:email)
> Zach Dennis
Hi Zach. That's a great way of iterating over test data. Do you have
any suggestions for how much test data to use?
More information about the rspec-users