Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7947571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:28:12+00:00 2026-06-04T01:28:12+00:00

Since the paths.env file is not generated for Cucumber 1.1+, if for example if

  • 0

Since the paths.env file is not generated for Cucumber 1.1+, if for example if I use the visit login_path frequently for my test steps, should I create an individual step for it or should I just use visit login_path everywhere? If it ever changes, I can easily do a string replace under the features directory.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T01:28:14+00:00Added an answer on June 4, 2026 at 1:28 am

    If it’s really just a matter of DRYing up your calls to visit login_path I’d just leave them be since they are clear and concise as they stand, and you (probably) ain’t gonna need to change the login path helper.

    However if you start seeing slightly more complicated steps like this,

    # in features/step_definitions/profile_steps.rb
    
    When /^I go to my profile$/ do
      visit user_path(@current_user)
    end
    

    consider using the paths.rb model:

    # in features/step_definitions/common_steps.rb
    
    Given /^I go to (.+)$/ do |page_name|
      visit path_to(page_name)
    end
    
    # in features/support/paths.rb
    
    module NavigationHelpers
      def path_to(page_name)
        when /my profile/
          user_path(@current_user)
        ...
      end
    end
    World(NavigationHelpers)
    

    That’s right, I like paths.rb and selectors.rb and copy them to new projects 🙂 I am glad to see the “kitchen sink” web_steps.rb go though. For examples of how I use the support files: https://github.com/coshx/green-eggs/blob/master/features/support

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my applications, I often have to use relative paths. For example, when I
Since enumeration uses integers, what other structure can I use to give me enum-like
I know since the 3.0 SDK we can use accessories, so my question is
If I use relative paths in Javascript to GET a page from a server
Pretty simple question (probably) but I guess since im new to python im not
Right now I'm thinking write the paths to a file in the pre-build event
Since updating the subclipse plugin the paths next to project name in Eclipse disappeared.
Since I couldn't figure out how to set up two different POST resource paths
I have this script which processes lines containing windows file paths. However the script
Since the support for BO and Crystal pretty much stinks when it comes to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.