[rspec-users] Best practices: How small to make examples?
pat.maddox at gmail.com
Sun Apr 5 14:39:55 EDT 2009
On Sun, Apr 5, 2009 at 10:03 AM, Mark Wilden <mark at mwilden.com> wrote:
> Sometimes, they can be combined. But my point is that scenarios still
> have to describe how the user relates to the form
Scenarios should describe how a user relates to the application.
Whether you choose to do that by using fine- or course-grained stories
is context-dependent - what level of explicitness makes your customer
happy, other test coverage, etc.
> and 'Given I
> register for a conference' doesn't do that. When you do have a
> scenario that includes this level of detail, you don't need a view
> spec, IMO. And you can still code step-by-step.
True. Although you invariably lose defect isolation when you do it
this way. There are a lot more potential causes of failure when you
go through the whole stack than when you render a view in isolation.
Whether defect isolation is valuable enough to incur the cost of view
specs is up to you.
More information about the rspec-users