http://code.google.com/p/tinybdd/source/detail?r=55
Modified:
/trunk/TinyBDD/Dsl/GivenWhenThen/ScenarioClass.cs
/trunk/TinyBDDTests/Dsl/GivenWhenThen/ScenarioClassSpecs.cs
=======================================
--- /trunk/TinyBDD/Dsl/GivenWhenThen/ScenarioClass.cs Tue Sep 8 01:30:22
2009
+++ /trunk/TinyBDD/Dsl/GivenWhenThen/ScenarioClass.cs Tue Sep 15 00:04:29
2009
@@ -33,6 +33,8 @@
public void Scenario(string text)
{
semanticModelState.Text = text;
+ semanticModelState.Arranges.Clear();
+ semanticModelState.Acts.Clear();
}
public GivenSemantics Given(string text)
=======================================
--- /trunk/TinyBDDTests/Dsl/GivenWhenThen/ScenarioClassSpecs.cs Tue Sep 8
01:30:22 2009
+++ /trunk/TinyBDDTests/Dsl/GivenWhenThen/ScenarioClassSpecs.cs Tue Sep 15
00:04:29 2009
@@ -62,6 +62,17 @@
semanticModelState.Text.ShouldBe("custom text");
}
+
+ [Test]
+ public void
Assure_describing_Scenario_with_custom_text_reset_the_SemanticModel()
+ {
+ scenario.Given("there are changesets in sourceControl");
+ semanticModelState.Arranges.Count.ShouldBe(1);
+
+ scenario.Scenario("a new scenario");
+ scenario.Given("there are changesets in sourceControl");
+ semanticModelState.Arranges.Count.ShouldBe(1);
+ }
}
[TestFixture]