Sha256: 4acd21f1db2f96d4ee3abfb3414d9279dfe74525851bf3fd76a2d66f53db8d77

Contents?: true

Size: 497 Bytes

Versions: 17

Compression:

Stored size: 497 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/
      "/newsletter/Joe Someone/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

17 entries across 17 versions & 5 rubygems

Version Path
email_spec-0.6.6 examples/sinatra/features/support/paths.rb
email_spec-0.6.5 examples/sinatra/features/support/paths.rb
path-email_spec-0.6.2 examples/sinatra/features/support/paths.rb
email_spec-0.6.4 examples/sinatra/features/support/paths.rb
email_spec-tricycle-0.6.3 examples/sinatra/features/support/paths.rb
email_spec-0.6.3 examples/sinatra/features/support/paths.rb
opsb-email_spec-0.6.2 examples/sinatra/features/support/paths.rb
email_spec-0.6.2 examples/sinatra/features/support/paths.rb
email_spec-0.6.1 examples/sinatra/features/support/paths.rb
email_spec-0.6.0 examples/sinatra/features/support/paths.rb
email_spec-0.5.0 examples/sinatra/features/support/paths.rb
email_spec-0.4.0 examples/sinatra/features/support/paths.rb
email_spec-0.3.8 examples/sinatra/features/support/paths.rb
email_spec-0.3.7 examples/sinatra/features/support/paths.rb
email_spec-0.3.6 examples/sinatra/features/support/paths.rb
glennr-email_spec-0.3.5 examples/sinatra/features/support/paths.rb
email_spec-0.3.5 examples/sinatra/features/support/paths.rb