[rspec-users] Using semantics in steps

Peter Jaros peter.a.jaros at gmail.com
Fri Dec 19 09:53:56 EST 2008

On Fri, Dec 19, 2008 at 1:09 AM, Andrew Premdas <apremdas at gmail.com> wrote:

> then we have
> 1) Defined semantic tags that the designer should not touch
> 2) Not relied on any html elements that a designer might change
> 3) Created a step that works with the meaning of the UI not its presentation
> So what do you think?

100% agree.  The more semantic your test code is, the less likely it
is to break, and the more likely it ought to when it does.  If there's
no longer a #lorries element on the page, the step will fail, but
that's a lot like saying that if the lorries aren't on the page the
step will fail.  And that's a good thing.


More information about the rspec-users mailing list