tracks/features/support/paths.rb

23 lines
444 B
Ruby
Raw Normal View History

module NavigationHelpers
def path_to(page_name)
case page_name
when /the homepage/
root_path
when /the statistics page/
stats_path
# Add more page name => path mappings here
else
raise "Can't find mapping from \"#{page_name}\" to a path.\n" +
"Now, go and add a mapping in features/support/paths.rb"
end
end
end
World do |world|
world.extend NavigationHelpers
world
end