Hacker News new | ask | show | jobs
by rhizome 4843 days ago
Hear hear. I am dreading the technical debt I have in test-unit, and meanwhile the (Rails) world is moving on to Minitest and the world appears to be settling on Rspec syntax regardless. Nowhere to be found is even a conversion HOWTO, so test-unit starts feeling even more like a ghetto, and increases my conversion anxiety, which is all too bad, since I like what I consider to be the simplicity of test-unit.
1 comments

>I am dreading the technical debt I have in test-unit, and meanwhile the (Rails) world is moving on to Minitest

Minitest and Test::Unit are part of the same package since 1.9, with Test::Unit implemented as a simple compatibility layer on top of Minitest:

http://www.rubyinside.com/a-minitestspec-tutorial-elegant-sp...

The Minitest assertions are quite similar to the old Test::Unit assertions, a large number are identical:

http://rubydoc.info/stdlib/minitest/1.9.3/MiniTest/Assertion...

Right, and I've seen many pages like the rubyinside one leaving me still hungry with questions like, "So, no more test_helper.rb or what?" Couldn't find that in either of those links.

This is really more of a general documentation quibble on my part though, since I'm the dope who can't read through my questions and find the answers in the source (or wherever). I've been planning on making a blog post about 1:1 mapping of concepts between Test::Unit and Minitest learned from my own transformation, but as I've mentioned, I haven't been able to undertake that yet.

The docs really are lacking in this case; I expected the Test::Unit docs would document what's being stubbed and not in MiniTest but there's nothing there on that as near as I can tell.

As a rule, I miss the thoroughness of CPAN/Perl docs. Some ruby packages have amazing docs but often I feel at sea, particularly with regard to high level overviews and examples.