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

The Archive Base Latest Questions

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

I have assertions in place in my ruby script. Each of these assertions also

  • 0

I have assertions in place in my ruby script.

Each of these assertions also has a message to describe the assertion.

So I have two questions revolving around this

  1. I want the messages associated with each assert to display as the
    test progresses. Currently the Message only displays when any thing
    fails

  2. The entire test exits when any assertion fails. How do i make the
    tests continue even if one assertion fails?

Sample code that i am using

assert_match("hey", "hey this is a test", "The word exists in the string")

So the output currently looks like –

ruby ruby11.rb -v v
Loaded suite ruby
Started
test_ruby(Ruby): 
F

Finished in 40.555587 seconds.

  1) Failure:
test_ruby11(Ruby11) [ruby11.rb:73]:
Text box not displayed
<false> is not true.

1 tests, 3 assertions, 1 failures, 0 errors

And i want it to look like

ruby ruby.rb -v v
Loaded suite ruby
Started
test_ruby(Ruby): 
F

ok 1 - First test successful
ok 2 - The text is displayed
ok 3 - The image is present
not ok 4 - Text box not displayed
ok - The picture is visible

Finished in 40.555587 seconds.

  1) Failure:
test_ruby(Ruby) [ruby11.rb:73]:
Text box not displayed
<false> is not true.

1 tests, 4 assertions, 1 failures, 0 errors

So in the above desired display, all assertion states are displayed as an when the test is executed. (Something like TAP in perl).
I am new to ruby, so i am sure there is something basic I am doing wrong.

Also i have tried the verbose parameter ruby ruby.rb -v v, while running the script. But that does not help either.

Help will be apprecaited

  • 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-27T11:11:33+00:00Added an answer on May 27, 2026 at 11:11 am

    There isn’t much choice for TAP output specifically. One test framework that did was Bacon, which was an RSpec clone with TAP output, but it doesn’t appear to be active anymore.

    If what you want is compatibility with Continuous Integration, The ci_reporter gem can be used to convert test results (from both Test::Unit and RSpec) to the JUnit XML format which will make it work with Jenkins/Hudson, Bamboo, and other JUnit-aware CI servers.

    But unlike RSpec, Test/Unit has a limitation where it doesn’t report the tests that pass. There’s a discussion about running Test/Unit through the RSpec HTML formatter which will include the names of the passing tests here.

    2015 update: You may want to look into MiniTest, which is gaining popularity now and has many formatter plugins and is otherwise very flexible/extendable.

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

Sidebar

Related Questions

I have two components, A and B. Component B requires that A has a
By that I mean, what do I need to do to have useful assertions
See also these related resources: Does the .NET garbage collector perform predictive analysis of
I recently came upon the need to have compile-time assertions in C++ to check
I have some XML: <messages> <message> <meta appid=1112 date=20111028 msgid=4498016 msgno=855 permlinkdate=2011-10-28> <summary>RedBook is
I have script called Script.php and tests for it in Tests/Script.php, but when I
I have a few pure-JavaScript, client-side tests using PhantomJS. These I'd like to integrate
I have a Ruby on Rails app that I'm working on and I'm having
I have an Ruby on Rails 3 admin_controller with the default set of CRUD,
I have unexpected assertions faillures in my code using a checked STL implentation. After

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.