From: Nathaniel Talbott Date: 2004-02-05T05:07:39+09:00 Subject: Re: New Computer, version, confusion On Feb 4, 2004, at 14:55, Ronald E Jeffries wrote: > I just got a new computer and need to get stuff moved over to it. > Among "stuff" is Ruby, which mediates building my web site. > > I had taken to building my little projects with a project file that > looks like this: > > project.rb: > ========== > require 'rubyunit' > require "binsrch.rb" > > With the actual program and tests (for simple examples) in the second > required file, as shown below. > > I used to reference TestCase thus: > > > class TestBinsrch < TestCase > > in Ruby 1.6, but now in 1.8 I have to say > > > class TestBinsrch < Test::Unit::TestCase > > When I make that change, things seem to be working OK. What happened? > What would I have to do to make it go back to the other way? Well, previously you were probably using an actual installation of RubyUnit, which I guess aliased RUNIT::TestCase to the top-level constant TestCase. Test::Unit doesn't do that, because I'd rather not pollute the namespace automatically. Thus you need to fully qualify the class name. A possible workaround if you have a bunch of tests that you don't want to change is to do the following before your tests: include Test::Unit Which imports that namespace in to the top-level. HTH, Nathaniel <:((><