diaspora/features/support/paths.rb
Sarah Mei 8193f2e350 Adding the rest of the new user setup to cucumber.
wip scenario for skipping the profile wizard.
2010-10-31 20:05:15 -07:00

18 lines
412 B
Ruby

module NavigationHelpers
def path_to(page_name)
case page_name
when /^the home page$/
root_path
when /^its ([\w ]+) page$/
send("#{$1.gsub(/\W+/, '_')}_path", @it)
when /^the ([\w ]+) page$/
send("#{$1.gsub(/\W+/, '_')}_path")
when /^"(\/.*)"/
$1
else
raise "Can't find mapping from \"#{page_name}\" to a path."
end
end
end
World(NavigationHelpers)