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

  • SEARCH
  • Home
  • 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 6989867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:16:11+00:00 2026-05-27T19:16:11+00:00

I am trying to get used to BDD with Cucumber and I wrote a

  • 0

I am trying to get used to BDD with Cucumber and I wrote a few features already but this one in particular I am confused about, here is the error:

Scenario:                                                               # features/viewing_posts.feature:6
Given there is a post with the title "Just another day at the beach"  # features/step_definitions/post_steps.rb:1
And I am on the homepage                                              # features/step_definitions/web_steps.rb:44
When I follow "Just another day at the beach"                         # features/step_definitions/web_steps.rb:56
Then I should be on the post page for "Just another day at the beach" # features/step_definitions/web_steps.rb:230
  Can't find mapping from "the post page for "Just another day at the beach"" to a path.
  Now, go and add a mapping in /Users/jeff/rails_projects/jeffc/features/support/paths.rb (RuntimeError)
  ./features/support/paths.rb:29:in `rescue in path_to'
  ./features/support/paths.rb:23:in `path_to'
  ./features/step_definitions/web_steps.rb:233:in `/^(?:|I )should be on (.+)$/'
  features/viewing_posts.feature:10:in `Then I should be on the post page for "Just another day at the beach"'

Failing Scenarios:
cucumber features/viewing_posts.feature:6 # Scenario: 

I checked my web_steps.rb in that error and I have the step that should match.

Then /^(?:|I )should be on (.+)$/ do |page_name|
  current_path = URI.parse(current_url).path
  if current_path.respond_to? :should
    current_path.should == path_to(page_name)
  else
    assert_equal path_to(page_name), current_path
  end
end

It’s passing up until the “Then I should be on the post page…”

Can anyone suggest what’s going on with this?

Thanks

J

  • 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-05-27T19:16:12+00:00Added an answer on May 27, 2026 at 7:16 pm

    It’s expecting to find a path mapping in paths.rb

    Now, go and add a mapping in /Users/jeff/rails_projects/jeffc/features/support/paths.rb (RuntimeError)
    

    You might need to move it. Do your other tests have this same issue by chance, or do they work with what you’ve already got?

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

Sidebar

Related Questions

I'm trying to get used to Ember.js and Handlebars, but one problem is puzzling
I am trying to get used to writing object oriented, but often I get
I am trying to get used to web development and one thing that eluded
I am trying get currently focused component id. For this I used following jQuery:
I normally use scp to copy stuff, but now I'm trying to get used
Trying to get the number of available comports. Used the following code: HKEY hKey;
well iam trying to get version of IE used by user by using $.browser.version
We are trying to get the Model-View-Presenter pattern used on (virtually) all new dev
I am trying to get the likes from a company pages (coca-cola) I used
I've been trying to get used to c++ with cmake and gtest (google test).

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.