[Rspec-devel] context could yield an object, and be nested

David Astels dastels at daveastels.com
Sun May 28 21:27:36 EDT 2006


On 28-May-06, at 8:19 PM, itsme213 wrote:

>> IMHO this is would be a source of complexity & confusion.
>>
>> 1) The more distributed the context and/or specifications are, the
>> more work it is to understand exactly what is going on.
>>
>> 2) Both contexts and specification should be as clear and simple as
>> possible.
>
> I agree with both these. Would you agree with this third principle?
>
> 3) Both contexts and specifications should not be duplicated  
> unnecessarily.

I would accept duplication for enhanced clarity.  This is not  
production code, clarity and understandability has very high  
priority.  In my experience, refactoring this code too aggressively  
negatively impacts understandability.

Dave



More information about the Rspec-devel mailing list