5

My tests all pass and my results look like this:

Started

Finished in 361.988408 seconds.

479 tests, 1017 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 0% passed

Why don't I see the usual progress dots I used to see in rails 2.3? And why does it say "0% passed"? I wonder if the dots turned white and are actually there, in the seemingly blank space? I don't like to change my terminal to have black background. ;-)

Also in my unit tests it says "Finished in 0.0 seconds". which is clearly wrong.

Nico
  • 881
  • 1
  • 6
  • 19

3 Answers3

2

Okay, I found a solution to this: I replaced the test-unit gem in my gem file with the minitest gem. That fixed the test output.

Nico
  • 881
  • 1
  • 6
  • 19
  • Well I have `gem 'minitest'` in my `Gemfile` but the symptoms described in your question are still present. Any ideas? – jibiel Jan 03 '12 at 21:28
  • I solved this by replacing `Test::Unit::TestCase` with `MiniTest::Unit::TestCase` and `require 'test/unit'` with `require 'minitest/autorun'` – deivid Jun 25 '13 at 12:23
0

I upgraded 'test-unit' and I got the dots back. At the moment of writing this the version is 3.1.8.

THIS IS NOT AN EXISTING ANSWER. Other answers suggest to replace test-unit with minitest, or say something is related to timecop. In my case I couldn't replace test-unit with minitest because they have incompatible APIs. I was using an old version of test-unit so I decided to upgrade it. Now I'm using version 3.1.8 and the dots are showing again. Might be a bug in a old test-unit version.

asterite
  • 2,906
  • 1
  • 14
  • 14
  • This isn't about existing answers *on this question*. This is about you duplicating the same answer to multiple questions. If this question and another can be answered by the exact same answer, they are probably duplicates (the questions are), so flag one question as a dupe of the other. If the question is not a duplicate, then make sure your answers are addressing the unique differences in those questions. – Martijn Pieters Oct 27 '16 at 12:42
  • In other words, this answer is still the exact same one as [this copy of this answer](http://stackoverflow.com/questions/26104868/ruby-why-are-no-dots-showing-when-i-run-tests-with-testunit/40266180#40266180). If that question and this question have the same answer, why not flag one of these as a duplicate of the other? If they are not duplicate questions, then make sure this answer addresses this question, the other answer addresses the other. – Martijn Pieters Oct 27 '16 at 12:43
0

Are you using something like timecop by any chance? I remember being baffled about the "0.0 seconds" once and it turned out that I forgot to "come back in time" after my tests...

I'd also like to have my dots back =/

potibas
  • 619
  • 5
  • 7
  • Thanks, yep, I'm not using timecop, but I think I am messing with the Time class, so I'm pretty sure that's the reason. – Nico Aug 24 '11 at 07:34