trystan/hspec — Issue #40: Group items with same name
Author: sol
Created: 2011-12-07 09:09:44+00:00
State: open

Ok, here is an idea.

I often give one or more specific examples and a qc property for something that should hold. Here is an example:

describe "parse" $ do
it "is inverse to render" someSpecificExample
it "is inverse to render" someOtherSpecificExample
it "is inverse to render" property genericProperty

This produces the following output:

parse
- is inverse to render
- is inverse to render
- is inverse to render

What about producing the following output instead:

parse
- is inverse to render (3)

The primary goal is to save valuable screen estate and reduce clutter.
If one of the cases fails, we could still give the expanded output.

Do you have any other ideas, how we could deal with this. Or are there other approaches to testing, that make the above irrelevant. I'd be very happy to hear about your thoughts on this.