Sha256: 2235f06fa9e61e7d1ef259c5a2bc51014624989d05c940f77e0be544dac87869

Contents?: true

Size: 451 Bytes

Versions: 60

Compression:

Stored size: 451 Bytes

Contents

module NavigationHelpers
  def path_to(page_name)
    case page_name
    when "the new album page"
      '/albums/new'
    when /^the page for album "(.+)"$/
      album_path(Album.find_by_name($1))
    when /^the image for text "(.+)", size "(.+)"$/
      "/text/#{$1}/#{$2}"
    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

60 entries across 60 versions & 3 rubygems

Version Path
classiccms-0.7.5 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/support/paths.rb
classiccms-0.7.4 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/support/paths.rb
classiccms-0.7.3 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/support/paths.rb
classiccms-0.7.2 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/support/paths.rb
classiccms-0.7.1 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/support/paths.rb
classiccms-0.7.0 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/support/paths.rb
dragonfly-0.9.15 fixtures/rails/files/features/support/paths.rb
dragonfly-0.9.14 fixtures/rails/files/features/support/paths.rb
dragonfly-0.9.13 fixtures/rails/files/features/support/paths.rb
classiccms-0.6.9 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/support/paths.rb
classiccms-0.6.8 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/support/paths.rb
classiccms-0.6.7 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/support/paths.rb
classiccms-0.6.6 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/support/paths.rb
classiccms-0.6.5 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/support/paths.rb
classiccms-0.6.4 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/support/paths.rb
classiccms-0.6.3 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/support/paths.rb
classiccms-0.6.2 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/support/paths.rb
classiccms-0.6.1 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/support/paths.rb
classiccms-0.6.0 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/support/paths.rb
classiccms-0.5.17 vendor/bundle/gems/dragonfly-0.9.12/fixtures/rails/files/features/support/paths.rb