On Apr 11, 2008, at 8:15 AM, David Chelimsky wrote:

On Apr 11, 2008, at 4:44 AM, Ashley Moran <[EMAIL PROTECTED] > wrote:


On 11 Apr 2008, at 03:14, Rick DeNatale wrote:

I'm thinking that I might just write a whole new xxx_steps.rb file
which would run the same story but at the real user interaction level, and keep the model level steps also. I still haven't convinced myself
one way or the other.

Wow, I had never thought of this. Could you really write a story that
could be executed in two different environments based on the steps
file that got loaded?

Absolutely. That is, in fact, one benefit of plain text stories that we don't have with ruby stories ... Yet.

This is also a motivating factor in my own choice to keep the steps worded at high levels of abstraction. For example:

Given I am filling in my profile
When I enter nothing for E-Mail Address
And I submit my info
Then I should receive an error message telling me that E-Mail Address is required

This scenario does not say "page" or "screen." It could run against a web system, desktop, command line, or even a batch system, though that might be a bit of a stretch.

Of course, there are going to be cases when more granularity is required. If there is a requirement for a very specific user experience, something ajaxy for example, but these should be separated out as UI specific stories.

Cheers,
David

_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to