From: John Smith Date: 2009-12-31T10:41:03+09:00 Subject: Re: Test::unit assertion pass scenario Yep, the example below is exactly the way I'm using it. However, as demonstrated in your example, the 259 assertions that were run (and passed) do not display any kind of passing checkpoint, the way it would have if any of those assertions failed. Basically, I am looking for a way to provide info just for both passed and failed assertions, similar to what is done when an assertion fails. Thanks again! Ryan Davis wrote: > On Dec 30, 2009, at 12:08 , John Smith wrote: > >> When using the test::unit assertion, such as assert_equal, the script >> will throw a failure if the test condition (assertion) is not met. If it >> does pass, no output is displayed. >> >> Is there a way to force the results of the test to display both passes >> and failures? > > how are you using it?? Normally it displays something like: > >> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -w -I../../minitest/dev/lib:lib:ext:bin:test -e 'require "rubygems"; require "minitest/autorun"; require "test/test_autotest.rb"; require "test/test_focus.rb"; require "test/test_unit_diff.rb"; require "test/test_zentest.rb"; require "test/test_zentest_mapping.rb"' >> Loaded suite -e >> Started >> ....................................................................................................... >> Finished in 0.214105 seconds. >> >> 103 tests, 259 assertions, 0 failures, 0 errors, 0 skips > > (this is for minitest, not test/unit, but the output is very similar) > > Your test should be set up like: > >> # test_blah.rb: >> require 'test/unit' >> >> class TestThingy < Test::Unit::TestCase >> def test_thingy >> assert_equal 2, 1+1 >> end >> end. > > Here is a run: -- Posted via http://www.ruby-forum.com/.