module NavigationHelpers # Maps a static name to a static route. # # This method is *not* designed to map from a dynamic name to a # dynamic route like post_comments_path(post). For dynamic # routes like this you should *not* rely on #path_to, but write # your own step definitions instead. Example: # # Given /I am on the comments page for the "(.+)" post/ |name| # post = Post.find_by_name(name) # visit post_comments_path(post) # end # def path_to(page_name) page_name end end World(NavigationHelpers)