Module: NavigationHelpers

Defined in:
lib/cucumber_off_rails/templates/features/support/paths.rb

Instance Method Summary collapse

Instance Method Details

#path_to(page_name) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/cucumber_off_rails/templates/features/support/paths.rb', line 2

def path_to(page_name)
  case page_name

  when /home page/
    '/'
  when /login page/
    '/'
  when /path "(.+)"/
    $1

  else
    raise "Can't find mapping from \"#{page_name}\" to a path.\n" +
      "Now, go and add a mapping in #{__FILE__}"
  end
end