Sha256: 33654a5ba93d84a3233e121ccaae4aaea8a805d8b0abcde2420a77c6217af59f

Contents?: true

Size: 497 Bytes

Versions: 11

Compression:

Stored size: 497 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 do |world|
  world.extend NavigationHelpers
  world
end

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
jeffrafter-clearance-0.5.4 generators/clearance_features/templates/features/support/paths.rb
kellyfelkins-clearance-0.5.6 generators/clearance_features/templates/features/support/paths.rb
thoughtbot-clearance-0.4.9 generators/clearance_features/templates/features/support/paths.rb
thoughtbot-clearance-0.5.0 generators/clearance_features/templates/features/support/paths.rb
thoughtbot-clearance-0.5.1 generators/clearance_features/templates/features/support/paths.rb
thoughtbot-clearance-0.5.2 generators/clearance_features/templates/features/support/paths.rb
thoughtbot-clearance-0.5.3 generators/clearance_features/templates/features/support/paths.rb
thoughtbot-clearance-0.5.4 generators/clearance_features/templates/features/support/paths.rb
thoughtbot-clearance-0.5.6 generators/clearance_features/templates/features/support/paths.rb
thoughtbot-clearance-0.6.0 generators/clearance_features/templates/features/support/paths.rb
thoughtbot-clearance-0.6.1 generators/clearance_features/templates/features/support/paths.rb