Re: [rspec-users] regex help

2008-12-29 Thread Jonathan Linowes
Thanks that worked. Normally I would combine them into one step, but this case, one is in a general reusable steps file, and the other is specific to a feature. I thought the word "item" would be sufficient to distinguish the two. On Dec 29, 2008, at 1:07 AM, Stephen Eley wrote: On Su

Re: [rspec-users] regex help

2008-12-28 Thread Stephen Eley
On Sun, Dec 28, 2008 at 11:59 PM, Jonathan Linowes wrote: > > Perhaps tell it to ignore any matches with " item" in it, but dont know how It's called a zero-width negative lookahead, and it looks like this: /^the (?!\w+ item)(.*) should have a \<(.*)\> tag with "(.*)"/ I didn't test this to be s

Re: [rspec-users] regex help

2008-12-28 Thread Emmanuel Pinault
Are the steps doing anything different? I mean it seems like selected| first|second are part of .* so you can put that specific logic in the step I would thing and have one step to handle them all Or then just change slightly your sentence so they don t overlap Emmanuel On Dec 28, 2008

[rspec-users] regex help

2008-12-28 Thread Jonathan Linowes
Hi, Could someone help me resolve this conflict: Then the selected item should have a tag with "Foo:" Multiple step definitions match "the selected item should have a tag with \"Foo:\"": (Cucumber::Multiple) features/step_definitions/page_builder_steps.rb:355:in `/^the (selected|fi