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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:30:46+00:00 2026-06-17T12:30:46+00:00

My acceptance tests (RSpec/Capybara) have some long sequences of steps all under a single

  • 0

My acceptance tests (RSpec/Capybara) have some long sequences of steps all under a single it...do block, and I’d like to manually add some additional documentation of each step into the RSpec documentation output.

So where the RSpec output (in documentation format) currently looks like:

FooController
  New user creates account and creates profile
    it passes

Within the long sequence of steps I’d like to push some additional info to the output:

FooController
  New user creates account and creates profile
    ... new user saw signup page!
    ... new user got email confirmation!
    ... confirmation link worked!
    ... new user saw empty profile!
    ... new user filled in profile
    it passes

In terms of documenting the app, those extra statements would be better than a large black box with a single ‘it passed’ result message.

Since there is apparently no way to use multiple it...do blocks to build the long sequence of steps for a acceptance test, I’m hoping there is a simple way to push additional messages to the RSpec output stream, ideally with them being indented and displayed (red/green) as if they were pat or separate it...do examples.

  • 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-17T12:30:46+00:00Added an answer on June 17, 2026 at 12:30 pm

    Here’s what I did… added a nextstep(“message”) method to my specs that outputs “message” to the console using awesome_print gem so I can color it, and also to the logger.

      def nextstep(txt)
        $step += 1
        @speclog.debug ''
        @speclog.debug ''
        @speclog.debug "#{$scene}, step: #{$step}: " + txt
        ap (' ' * ($indent * 2 - 1)) + "step: #{$step}: " + txt, {:color => {:string => :blueish}}
      end
    

    A little hackish, but it does give us very nice descriptive output when running rspec, for example if we have

    it "New user creates account and creates profile" do
       # some assertions
       nextstep "... new user saw signup page!"
       # some assertions
       nextstep " ... new user got email confirmation!"
       # some assertions
       nextstep " ... confirmation link worked!"
       # some assertions
       nextstep "... new user saw empty profile!"
       # some assertions
       nextstep "... new user filled in profile"
    end
    

    we get the more descriptive spec output as shown in the question (and if there’s a failure we see the step we were on):

       step 1: ... new user saw signup page!
       step 2: ... new user got email confirmation!
       step 3: ... confirmation link worked!
       step 4: ... new user saw empty profile!
       step 5: ... new user filled in profile"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do you handle user stories/acceptance tests that have long chains like this one,
I have a strange problem with acceptance tests, capybara showing me only first scenario
Im using capybara for my integration/acceptance tests. They're in /spec/requests/ folder. Now I have
I have a shell script that runs some acceptance tests for an application I'm
I have an acceptance spec using Capybara. However I would like to stub out
I'm writing some acceptance tests for a java webapp that returns JSON objects. I
I'm writing some automated acceptance tests for a flash movie (driving the movie using
I'm writing some acceptance tests for an application using the ActivityInstrumentationTestCase2 class. I want
I'm still on Rails 2.3.x and using Rspec, Capybara and Steak to do some
I am trying to run some acceptance tests for javascript code. However, when I

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.