Sha256: 6cacf1b04e1857d74f38d1adc3ce565d72046afeafaaf502e83d6c2f5cccef18

Contents?: true

Size: 494 Bytes

Versions: 13

Compression:

Stored size: 494 Bytes

Contents

module NavigationHelpers
  def path_to(page_name)
    case page_name

    when /the home\s?page/
      '/'
    when /the sign up page/i
      sign_up_path
    when /the sign in page/i
      sign_in_path
    when /the password reset request page/i
      new_password_path

    # Add more page name => path mappings here

    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

13 entries across 8 versions & 4 rubygems

Version Path
janova-clearance-0.8.8 generators/clearance_features/templates/features/support/paths.rb
forgetful-clearance-0.8.11 generators/clearance_features/templates/features/support/paths.rb
forgetful-clearance-0.8.10 generators/clearance_features/templates/features/support/paths.rb
benaldred-clearance-0.8.8 generators/clearance_features/templates/features/support/paths.rb
benaldred-clearance-0.8.8 test/rails_root/features/support/paths.rb
clearance-0.8.8 generators/clearance_features/templates/features/support/paths.rb
clearance-0.8.8 test/rails_root/features/support/paths.rb
clearance-0.8.7 test/rails_root/features/support/paths.rb
clearance-0.8.7 generators/clearance_features/templates/features/support/paths.rb
clearance-0.8.6 test/rails_root/features/support/paths.rb
clearance-0.8.6 generators/clearance_features/templates/features/support/paths.rb
clearance-0.8.5 test/rails_root/features/support/paths.rb
clearance-0.8.5 generators/clearance_features/templates/features/support/paths.rb