[rspec-users] Stories - Use view matchers rather than assigns.should?
dchelimsky at gmail.com
Fri Apr 11 10:18:13 EDT 2008
On Apr 11, 2008, at 8:15 AM, David Chelimsky wrote:
> On Apr 11, 2008, at 4:44 AM, Ashley Moran <ashley.moran at patchspace.co.uk
> > 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
>>> and keep the model level steps also. I still haven't convinced
>>> one way or the other.
>> Wow, I had never thought of this. Could you really write a story
>> 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
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users