Given/When/Then inlined variables
corbym opened this issue · comments
Matt commented
As a developer, I want to be able to inline variables I pass to my functions in a formatted way, so that my tests are more understandable.
Example:
func TestMyStuff(testing testing.T){
Given(iAmMaking_CupsOf_Tea(3, "Earl Grey")).
When(iPour_MillilitersOfWater("250")).
Then(func(...){
// some assertions
}
}
.. should render as:
Given I am making 3 cups of Earl Grey Tea
When I pour 250 milliliters of water
Then
// some assertions