I have statements in my ruby ββscript.
Each of these statements also has a message to describe the statement.
So, I have two questions revolving around this
I want the messages associated with each statement to be displayed as tests progress. Currently, the message is displayed only when something cannot
The whole test fails when any statement fails. How to make tests continue even if one statement fails?
Sample code that I use
assert_match("hey", "hey this is a test", "The word exists in the string")
So the conclusion currently looks like
ruby ruby11.rb -vv 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 -vv 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
Thus, in the above display, all approval states are displayed as when the test is running. (Something like TAP in perl). I'm new to ruby, so I'm sure there is something basic that I am doing wrong.
I also tried the ruby ruby.rb -vv verbose parameter, when running the script. But that doesn't help either.
Help will be appreciated
source share