>At first glance, that is really cool. We've also batted around some<br>
>other names like #facet or #behavior.<br><br>LOL..I smile because we went through the same semantic struggles as well.<br><br>The funny thing is the rSpec project led us to our resolve. :-)<br><br>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.<br>
<br>pseudo DSL:<br><br>these specs are concerning this [Type]<br> when this [type] is in this context<br> then specify that it should behave this way<br><br>In C# this DSL creates a lot of noise in the syntax! For example:<br>
<br>[Context, Concerning("EquationGenerator")]<br> public class When_initializing_the_EquationGenerator_with_one_and_five : NBehave.NUnitSpecBase<br> {<br> protected override void Before_each_spec()<br>
{<br> _generator = new EquationGenerator(_LowerBound, _UpperBound);<br> }<br><br> [Specification]<br> public void Should_generate_equations_where_the_left_hand_side_is_greater_than_or_equal_to_the_lower_bound()<br>
{<br> IList<Equation> equations = _generator.GenerateEquations();<br><br> foreach (Equation equation in equations)<br> {<br> equation.LeftHandSide.should_be_greater_than_or_equal_to(_LowerBound);<br>
}<br> }<br><br> [Specification]<br> public void Should_generate_equations_where_the_left_hand_side_is_less_than_or_equal_to_the_upper_bound()...<br><br> [Specification]<br> public void Should_generate_equations_where_the_right_hand_side_is_greater_than_or_equal_to_the_lower_bound()...<br>
<br> [Specification]<br> public void Should_generate_equations_where_the_right_hand_side_is_less_than_or_equal_to_the_upper_bound()...<br><br> [Specification]<br> public void Should_generate_twenty_five_equations()...<br>
}<br><br> <br>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 complete.<br>