[rspec-users] Just trying out cucumber

Pau Cor lists at ruby-forum.com
Mon Nov 24 21:56:12 EST 2008


Pau Cor wrote:
> /\<p\>\s*\<b\>Token\:\<\/b\>\s*[a-f0-9]{40}\s*\<\/p\>/m

On second thought, you might want to make that regex more generic. When 
you refactor your view code (i.e. insert divs, add ids/classes, and get 
rid of the <b> tags--which are evil) then your test won't break.

The customer cares that there is a token, not that the token is in a <p> 
tag and the label is bold.

Paul
-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list