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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:18:55+00:00 2026-05-25T17:18:55+00:00

https://stackoverflow.com/questions/5282437/cucumber-pickle-factory-girl-given-a-returning-undefined-step – this post didn’t help me a lot. Gemfile: gem ‘rails’ # 3.0.5

  • 0

https://stackoverflow.com/questions/5282437/cucumber-pickle-factory-girl-given-a-returning-undefined-step – this post didn’t help me a lot.

Gemfile:

gem 'rails' # 3.0.5
gem 'capybara' # 1.1.1
gem 'rspec-rails' # 2.6.1
gem 'cucumber-rails' # 1.0.5
gem 'database_cleaner'
gem 'factory_girl_rails' # 1.2.0
gem 'email_spec'
gem 'pickle' # 0.4.8

I do:

rails new pickle_test
bundle install
rails g cucumber:install
rails g rspec:install
rails g pickle --paths --email
rails g scaffold category title:string 
rake db:migrate
rake db:test:prepare
cucumber

I have:

$ cucumber
Using the default profile...
Feature: Manage categories

  Scenario: list existed categories                       # features/manage_categories.feature:3
    Given a category exists, title: "First category ever" # features/manage_categories.feature:4
      Undefined step: "a category exists, title: "First category ever"" (Cucumber::Undefined)
      features/manage_categories.feature:4:in `Given a category exists, title: "First category ever"'
    When I go to the categories page                      # features/step_definitions/web_steps.rb:48
    Then I should see "First category ever"               # features/step_definitions/web_steps.rb:105

1 scenario (1 undefined)
3 steps (2 skipped, 1 undefined)
0m0.127s

You can implement step definitions for undefined steps with these snippets:

Given /^a category exists, title: "([^"]*)"$/ do |arg1|
  pending # express the regexp above with the code you wish you had
end

Note that I did nothing to configure this test app anyhow and I don’t use factory_girl or anything rather then ActiveRecord. I’m confident it should work from there. Pickle itself is loaded (tested with puts), cucumber runs using environments/test.rb.

What I am missing?

  • 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-25T17:18:55+00:00Added an answer on May 25, 2026 at 5:18 pm

    Your step def is not using the correct phraseology.

    The default Pickle steps (you should feel free to adapt them to your app/style) expect the following:

    Given a category exists with title: “First category ever”

    Cheers,
    Ian

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

Sidebar

Related Questions

I posted this question: https://stackoverflow.com/questions/418597/java-and-net-for-php-programmer and the answers I was given didn't really help
In answering this question ( https://stackoverflow.com/questions/352317/c-coding-question#352327 ), it got me wondering... Is there any
Referring to this question: https://stackoverflow.com/questions/2035449/why-is-oop-hard-for-me class Form { protected $inputs = array(); public function
I was reading this thread/post: https://stackoverflow.com/questions/262298/windows-c-ui-technology and am also wondering about a non .NET
First look at this url: https://stackoverflow.com/questions/tagged/xoxoxo/ This directory does not exists but somehow stackoverflow
I just finished looking at this question: https://stackoverflow.com/questions/753122/which-cloud-computing-platform-should-i-choose But, I am not certain what
This question is similar in spirit to : https://stackoverflow.com/questions/492178/links-between-personality-types-and-language-technology-preferences But it is based specifically
I browsed around here on Stackoverflow and found this topic : https://stackoverflow.com/questions/279/aspnet-visual-studio-and-subversion-how-to-integrate However that
This is the same question as this: https://stackoverflow.com/questions/2890620/jquery-running-a-function-in-a-context-and-adding-to-a-variable But that question was poorly posed.
I am aware of this question: https://stackoverflow.com/questions/428691/how-to-encourage-implementation-of-tdd In my team, we write a lot

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.