I have a step definition, below, that does what I want it to do i.e. it checks the url of the page against the 'page' element of 'PAGES' hash.
Then(/^I should( still)? be at the "(.*)" page$/) do |still, page|
BROWSER.url.should == PAGES[page]
end
The step definition is used for both
- I should be at the ... page
- I should still be at the ... page
However, I don't need "still" to be passed into the block. I just need it to be optional for matching to the step but not passed into the block. How can I do that?
Thanks.