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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T03:31:59+00:00 2026-05-19T03:31:59+00:00

Just want to make sure I understand things. From what I gather so far,

  • 0

Just want to make sure I understand things.

From what I gather so far, Cucumber is simply a ‘wrapper’ or a nice way to organize your tests by categorizing things into features and steps, where the actual unit tests are in the steps phase.

It allows to organize your tests into how things will work.

Is that correct?

  • 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-19T03:31:59+00:00Added an answer on May 19, 2026 at 3:31 am

    Sort of.

    It is a way to organize tests, but it’s more than that. It behaves like the original Rails integration tests were supposed to, but is much easier to use. The big win here being that your session is maintained transparently across the entire Scenario.

    Another thing that’s going on with Cucumber is that you’re (supposed to be) testing from the point-of-view of a browser or client using your code. If you want you can use steps to build objects and set up state, but usually you want your steps to go through the motions required to achieve that state in the first place.

    For example you could do this:

    Given /I have a user account/ do
      @user = Factory.create(:user)
      # ... more user set up
    end
    

    But you should probably do something like this instead:

    Given /I have a user account/ do
      visit new_user_url
      fill_in "user_login", :with => "some name"
      fill_in "user_password", :with => "foo"
      # ... whatever else your sign up page needs
    end
    

    And of course you can pass in arguments to either of those steps to give your calling code some more fine-grained control over the step’s behavior.

    What I have generally been doing with my tests is as follows.

    1. I use shoulda, but rspec is fine too.
    2. I write my negative-auth tests (i.e. Access denied is expected) as Rails functional tests.
    3. I write my positive-auth tests (i.e. users doing what they are supposed to be doing) as Cucumber features.

    And, of course, I still write Rails unit tests for my models, libraries, helpers, etc.

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

Sidebar

Related Questions

I just want to make sure I understand SyncLock correctly. Given the following code
I Just want to make sure I understand this correctly... search is an object
I think that I fully understand this, but I just want to make sure
Just want to make sure I understand this correctly (I'd ask on SO Chat,
Just want to make sure one thing. In a windows machine (either a desktop
Hi I just want to make sure I have these concepts right. Overloading in
I am doing a md5 hash, and just want to make sure the result
I basically want to make things easier by just looping LinkButtons instead of making
Just want to make sure I'm not overlooking something obvious... It seems like it
I've seen a few posts on this, but I just want to make sure

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.