Sha256: c0c1ec43a06e6dd2a7aca7b6083122e9e56fa31ea591d1c80b7b51b7b4a9a11e

Contents?: true

Size: 759 Bytes

Versions: 108

Compression:

Stored size: 759 Bytes

Contents

module NavigationHelpers
  # Maps a name to a path. Used by the
  #
  #   When /^I go to (.+)$/ do |page_name|
  #
  # step definition in webrat_steps.rb
  #
  def path_to(page_name)
    case page_name
    
    when /the homepage/
      '/'
    
    when /the public feed index/
      feeds_path
    
    when /the feed admin page/
      admin_feeds_path

    when /the visit resource page/
      visit_path(Entry.first)

    # Add more mappings here.
    # Here is a more fancy example:
    #
    #   when /^(.*)'s profile page$/i
    #     user_profile_path(User.find_by_login($1))

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

World(NavigationHelpers)

Version data entries

108 entries across 108 versions & 3 rubygems

Version Path
muck-services-0.1.47 test/rails_root/features/support/paths.rb
overlord-3.0.2 test/rails_test/features/support/paths.rb
overlord-3.0.1 test/rails_test/features/support/paths.rb
muck-services-0.1.46 test/rails_root/features/support/paths.rb
overlord-3.0.0 test/rails_test/features/support/paths.rb
muck-services-0.1.45 test/rails_root/features/support/paths.rb
overlord-0.1.22 test/rails_root/features/support/paths.rb
overlord-0.1.21 test/rails_root/features/support/paths.rb
muck-services-0.1.44 test/rails_root/features/support/paths.rb
muck-services-0.1.43 test/rails_root/features/support/paths.rb
muck-services-0.1.42 test/rails_root/features/support/paths.rb
muck-services-0.1.41 test/rails_root/features/support/paths.rb
muck-services-0.1.40 test/rails_root/features/support/paths.rb
muck-services-0.1.39 test/rails_root/features/support/paths.rb
overlord-0.1.20 test/rails_root/features/support/paths.rb
muck-services-0.1.38 test/rails_root/features/support/paths.rb
muck-services-0.1.37 test/rails_root/features/support/paths.rb
muck-services-0.1.36 test/rails_root/features/support/paths.rb
overlord-0.1.19 test/rails_root/features/support/paths.rb
muck-services-0.1.35 test/rails_root/features/support/paths.rb