Sha256: 0af0c83294e065268ae37a17dfe95ad87143fa98c9ae1936836906ae1677a5d0

Contents?: true

Size: 533 Bytes

Versions: 10

Compression:

Stored size: 533 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 /request a newsletter/
      request_newsletter_url('Name' => 'Joe Someone', 'Email' => 'example@example.com')

    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

10 entries across 10 versions & 3 rubygems

Version Path
bmabey-email_spec-0.3.2 examples/rails_root/features/support/paths.rb
bmabey-email_spec-0.3.3 examples/rails_root/features/support/paths.rb
bmabey-email_spec-0.3.4 examples/rails_root/features/support/paths.rb
email_spec-0.5.0 examples/rails_root/features/support/paths.rb
email_spec-0.4.0 examples/rails_root/features/support/paths.rb
email_spec-0.3.8 examples/rails_root/features/support/paths.rb
email_spec-0.3.7 examples/rails_root/features/support/paths.rb
email_spec-0.3.6 examples/rails_root/features/support/paths.rb
glennr-email_spec-0.3.5 examples/rails_root/features/support/paths.rb
email_spec-0.3.5 examples/rails_root/features/support/paths.rb