Sha256: 6f59e2bc795d015eefbc277363dfb8d48bf7cf7bdad46df5b2857b3b4f159c49

Contents?: true

Size: 461 Bytes

Versions: 33

Compression:

Stored size: 461 Bytes

Contents

module NavigationHelpers
  def path_to(page_name)
    case page_name
    
    when /the homepage/i
      root_path
    when /the sign up page/i
      new_user_path
    when /the sign in page/i
      new_session_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."
    end
  end
end
 
World(NavigationHelpers)

Version data entries

33 entries across 33 versions & 9 rubygems

Version Path
activerain-clearance-0.6.6 generators/clearance_features/templates/features/support/paths.rb
activerain-clearance-0.6.6001 generators/clearance_features/templates/features/support/paths.rb
activerain-clearance-0.6.6002 generators/clearance_features/templates/features/support/paths.rb
dacz-authuser-0.1.2 generators/authuser_features/templates/features/support/paths.rb
hui-clearance-0.6.6 generators/clearance_features/templates/features/support/paths.rb
joshuaclayton-clearance-0.6.4 generators/clearance_features/templates/features/support/paths.rb
qrush-clearance-0.7.0 generators/clearance_features/templates/features/support/paths.rb
thoughtbot-clearance-0.6.2 generators/clearance_features/templates/features/support/paths.rb
thoughtbot-clearance-0.6.3 generators/clearance_features/templates/features/support/paths.rb
thoughtbot-clearance-0.6.4 generators/clearance_features/templates/features/support/paths.rb
thoughtbot-clearance-0.6.5 generators/clearance_features/templates/features/support/paths.rb
thoughtbot-clearance-0.6.6 generators/clearance_features/templates/features/support/paths.rb
thoughtbot-clearance-0.6.7 generators/clearance_features/templates/features/support/paths.rb
thoughtbot-clearance-0.6.8 generators/clearance_features/templates/features/support/paths.rb
thoughtbot-clearance-0.6.9 generators/clearance_features/templates/features/support/paths.rb
thoughtbot-clearance-0.7.0 generators/clearance_features/templates/features/support/paths.rb
thoughtbot-clearance-0.8.0 generators/clearance_features/templates/features/support/paths.rb
thoughtbot-clearance-0.8.1 generators/clearance_features/templates/features/support/paths.rb
thoughtbot-clearance-0.8.2 generators/clearance_features/templates/features/support/paths.rb
tonkapark-clearance-0.6.9.1 generators/clearance_features/templates/features/support/paths.rb