From: Eric Hodel Date: 2008-01-08T06:52:31+09:00 Subject: Re: miniunit On Jan 5, 2008, at 11:59 AM, Joel VanderWerf wrote: > How does one actually use miniunit, if the normal test/unit is > present? > > For example, when I try to run miniunit's own tests: > > $ ruby test_test_case.rb > test_test_case.rb:8: uninitialized constant MiniTest (NameError) Use the handy rake task: $ gem fetch miniunit Downloaded miniunit-1.1.0.gem $ gem unpack miniunit-1.1.0.gem Unpacked gem: '/Users/drbrain/tmp/miniunit-1.1.0' $ cd miniunit-1.1.0/ ./miniunit-1.1.0/ $ rake (in /Users/drbrain/tmp/miniunit-1.1.0) /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -w -Ilib:ext:bin:test -e 'require "test/test_test_case.rb"; require "test/ test_test_unit.rb"; require "test/unit"' Loaded suite -e Started ................................................... Finished in 0.004319 seconds. 51 tests, 114 assertions, 0 failures, 0 errors > Or is miniunit only intended for use in a minimal environment where > test/unit is not present? require 'rubygems' require 'test/unit' Test = MiniTest Should do the trick. > This is mostly idle curiosity. I'm playing with some extensions to > the test/unit framework, and will probably start with miniunit > instead. For this purpose, I can just copy and rename, so that > miniunit isn't shadowed by test/unit.