Sha256: ee660e91853530a4dde56cc519bcd9fc1926cf129bc6e1588e9f764cd7d85cdf

Contents?: true

Size: 412 Bytes

Versions: 2

Compression:

Stored size: 412 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/
      '/'

    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

2 entries across 2 versions & 2 rubygems

Version Path
bmabey-email_spec-0.3.1 examples/rails_root/features/support/paths.rb
email_spec-0.3.1 examples/rails_root/features/support/paths.rb