Julian Leviston wrote:
You know what'd be awesome?

If Cucumber scenarios were referential.

I mean, wouldn't it be awesome if you could refer to them... so you could build on them...

So in a login.feature I'd define:

Scenario: logging in
Given that a default user exists
And I am on the login page
When I fill in "username" with "username"
And I fill in "password" with "password"
Then I should be logged in

And then in a different feature somewhere else, I could say:

another.feature

Scenario: make toast
Given Scenario "logging in"
Given I am on the exciting logged in page
Then I .... blah blah blah

and so on...

Julian.


Believe it or not, this exact feature did exist in Cucumber at one time but was deprecated and is now removed. You can find a good explanation of the reasoning behind that decision and what are the better alternatives on Joseph's blog:

http://blog.josephwilk.net/ruby/cucumber-waves-goodbye-to-givenscenario.html

-Ben
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to