That would indeed by the first way of using it.
This feature is implemented in the trunk earlier today.
Grouping of specs can be usefull if you have lot's of them though.
inside one class you could have :
[[Precondition(typeof(GetValue))]]
public bool IsNegative(Sut input, int output)
{
return input.IsNegative
}
and any spec in that class would have this precondition added to it's own. That way you don't have to repeat it in every spec.
I can imagine, well, ... I'm looking at it really ;-), a situation where one of the postconditions of most of the specs is 'the operation didn't throw an exception'
I was looking for a way to avoid repeating that all the time and this is what I came up with.
I could then have one class containing all these specs that don't throw an exception, and another one where I deal with what happens when an exception is thrown.