From: "David A. Black" Date: 2008-11-13T02:31:18+09:00 Subject: Re: Can't get output from MiniTest Hi -- On Thu, 13 Nov 2008, John Barnette wrote: > Hi, > > On Wed, Nov 12, 2008 at 5:37 AM, David A. Black wrote: >> I feel like a lamb to the slaughter, since I'm almost certainly doing >> something obviously wrong, but I'm having trouble understanding why >> I'm not getting any output from this: >> >> require 'minitest/unit' >> >> class TestMe < MiniTest::Unit::TestCase >> def test_something >> assert(true) >> end >> end > > Minitest doesn't install an at_exit hook by default. I think the > expectation is that Rake tasks, test helpers, or other project > infrastructure should activate the autorun magic explicitly. If you > want to have tests in a single file run as they would in test/unit, > adding this at the top should help: > > MiniTest::Unit.autorun Thanks -- that's the missing piece of the puzzle. David -- Rails training from David A. Black and Ruby Power and Light: Intro to Ruby on Rails January 12-15 Fort Lauderdale, FL Advancing with Rails January 19-22 Fort Lauderdale, FL * * Co-taught with Patrick Ewing! See http://www.rubypal.com for details and updates!