engine/features/step_definitions/within_steps.rb

15 lines
326 B
Ruby
Raw Normal View History

# http://mislav.uniqpath.com/2010/09/cuking-it-right/
{
# 'as a movie title in the results' => 'ol.movies h1',
# 'in a button' => 'button, input[type=submit]',
# 'in the navigation' => 'nav'
}.
each do |within, selector|
Then /^(.+) #{within}$/ do |step|
with_scope(selector) do
Then step
end
end
end