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 8948355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:57:53+00:00 2026-06-15T12:57:53+00:00

When using Cucumber for BDD (CS169.x1@edX) the following message is returned in response to

  • 0

When using Cucumber for BDD (CS169.x1@edX) the following message is returned in response to execution of ‘cucumber features/filter_movie_list.feature’:

When I uncheck the following ratings: G, PG-13                 # features/step_definitions/movie_steps.rb:44
  Undefined step: "When I uncheck "ratings_G"" (Cucumber::Undefined)
  ./features/step_definitions/movie_steps.rb:52:in `block (2 levels) in <top (required)>'
  ./features/step_definitions/movie_steps.rb:49:in `each'
  ./features/step_definitions/movie_steps.rb:49:in `/I (un)?check the following ratings: (.*)/'
  features/filter_movie_list.feature:30:in `When I uncheck the following ratings: G, PG-13'
...
You can implement step definitions for undefined steps with these snippets:

When /^When I uncheck "(.*?)"$/ do |arg1|
  pending # express the regexp above with the code you wish you had
end

The particular configuration in question has a declarative step in ‘features/filter_movie_list.feature’ that says:

When I uncheck the following ratings: G, PG-13

an attempt to implement the declarative steps in ‘features/step_definitions/movie_steps.rb’ (to reuse the imperative steps of ‘features/step_definitions/web_steps.rb’) which looks like:

When /I (un)?check the following ratings: (.*)/ do |uncheck, rating_list|
  step "When I uncheck \"ratings_G\""

and a working ‘features/step_definitions/web_steps.rb’ file (i.e. the one created by ‘rails generate cucumber_rails_training_wheels:install’ after gem installation) with an imperative default step like:

When /^(?:|I )uncheck "([^"]*)"$/ do |field|
  check(field)
end

Also, it seems like ‘features/step_definitions/web_steps.rb’ is accessible to Cucumber since adding When I uncheck "ratings_G" to ‘features/step_definitions/movie_steps.rb’ succeeds; anyone have any idea of what might be causing such behavior? The implementation of the declarative step has even been simplified so that no variable substitution takes place…

  • 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-15T12:57:55+00:00Added an answer on June 15, 2026 at 12:57 pm

    In this case the course material which was provided illucidates the difference but did not lead us to delineate between two steps that are very similar; changing “When I uncheck the following…” to “When unchecking the following…” allows web_steps.rb to come back into scope and get executed as desired (the previously linked posting, link: cucumber contradictory error messages, has more details).

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

Sidebar

Related Questions

I'm attempting to learn how to use Cucumber and creating steps using the following
I'm using cucumber for BDD and I used @wip tag for a certain scenario
I am using cucumber to write features for a new ruby on rails application.
I'm running what should be a basic BDD demonstration using Cucumber and Aruba on
I am using Cucumber for BDD development in my Ruby on Rails project and
I'm applying BDD methodology using Cucumber, which is GREAT! The problem is that my
I have a Java project that is using Cucumber for BDD. This morning the
I am using Cucumber with Capybara to build my testing framework for a site.
I've been having trouble using cucumber and webrat to test authlogic-openid authentication in a
I am new to rails and I having trouble using cucumber to run my

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.