[rspec-users] Newbie question Context vs Describe
agilejoe at gmail.com
Sun Feb 24 14:42:30 EST 2008
>At first glance, that is really cool. We've also batted around some
>other names like #facet or #behavior.
LOL..I smile because we went through the same semantic struggles as well.
The funny thing is the rSpec project led us to our resolve. :-)
We basically came to this conclusion every object has a behavior but that
behavior is governed by a context or multiple context concerning that type.
Given that we are specifying how an object should behave under a certain
context, the DSL quickly took shape. About the only difference is we
introduced the term [concerning] instead of describe.
these specs are concerning this [Type]
when this [type] is in this context
then specify that it should behave this way
In C# this DSL creates a lot of noise in the syntax! For example:
public class When_initializing_the_EquationGenerator_with_one_and_five :
protected override void Before_each_spec()
_generator = new EquationGenerator(_LowerBound, _UpperBound);
IList<Equation> equations = _generator.GenerateEquations();
foreach (Equation equation in equations)
public void Should_generate_twenty_five_equations()...
I think we have taken this as far as it can go for a statically typed
language. Hence my interest in rSpec especially once MS gets IronRuby
baked! I can easily see Ruby taking over the MS culture once IronRuby is
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users