On Fri, Sep 26, 2008 at 1:48 PM, Michael L. [email protected] wrote:
Thanks for the clarrification of your intent for the comment. After reading
the linked threads I have the following questions/comments:
- All the responses to sharing story content get “use ruby” as the
response.
2( I understand you appear to find this adequate. I do not.
- Should I open a new ticket for my suggestion or just add to the existing
ticket?
That ticket (Lighthouse - Beautifully Simple Issue Tracking)
is fine. The thing that Aslak is already planning on doesn’t really
address aggregating steps written in “scenario language”.
StepGiven: Log in as admin
This would only execute the scenario once, unlike GivenScenario. You can
What do you think?
I’m not comfortable with the idea of stripping out the Thens or adding
constructs like Require to features. Dependencies are a code concept
and I think that stating dependencies in a feature would be more
confusing that clarifying.
I do appreciate the goal, however, of being able to express “macros”
in “scenario” language. What I’d propose is that we add a macros
directory in which we’d have macro definition files that are just like
the ruby step definition files. So while you could define such a macro
in a ruby file like this (once Aslak implements it):
Given “I am logged in as admin” do
Given “I am registered as admin, David, secret”
When “I log in with David, secret”
end
… you’d also be able to do it in a macro file like this (macro is
just a suggestion, feel free to counter):
Macros:
Given: I am logged in as admin
Given I am registered as admin, David, secret
When I log in with David, secret
WDYT about that? Now you could use ruby or “scenario language” to say:
Scenario: admin can manage content
Given I am logged in as admin
Then I should see I should see a link to “Manage Content”
Although, now that I see this, I don’t like the fact that the Given
includes a When (an action). I think I’d rather see this expressed
this way:
Macros:
When: I log in as admin
Given I am registered as admin, David, secret
When I log in with David, secret
Scenario: admin can manage content
When I log in as admin
Then I should see I should see a link to “Manage Content”
Then the question becomes whether the output should “explode” the
macro for the reader. I think it would be useful sometimes, and
detrimental other times.
I guess, in the end, I might never use this feature myself, even if it
was added. I find the currently available tools much simpler.
Any other thoughts on this?
David