[rspec-users] Having a problem with new webrat matchers in cucumber 2

James Byrne lists at ruby-forum.com
Fri Mar 20 11:52:42 EDT 2009

James Byrne wrote:
> Aslak Hellesøy wrote:
>> We switched to using response.should contain(text) a while back. This is
>> just a wrapper around Rails' assert_contain, the preferred (I think) way 
>> to check for text on a page.

I am thinking that you are right.  This particular feature was written 
back when I was first starting out with cucumber, features and steps and 
BDD.  I have since taken to checking for specific css ids relating to 
messages and notices in steps rather than looking for the text itself. 
I likely will refactor this step to do the same.

I think, if it is not already on the wiki, that cucumber users might be 
encouraged to put any local additions to support/env.rb into a separate 
file like support/local_env.rb.  Running script/generate cucumber to 
upgrade an existing project leaves those with customized env.rb files 
with two equally unappealing alternatives; keep the old and forgo the 
new or replace it entirely.
Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list