From: Dave Thomas Date: 2002-02-26T04:31:14+09:00 Subject: Re: [ANN] TestUnit 0.1.1 Tobias Reif writes: > DT> TestCase = RUNIT::TestCase > > TR> That looks strange to me. > > DT> Perhaps, but its valid. > > No doubt :) I'm just trying to understand the concept. Class names, like 'String' are simply constants that reference the underlying class _object_. They can be assigned like any other values, so I could do dog = File cat = dog.new("/etc/passwd") etc The original assignment above merely makes TestCase reference the same class as RUNIT::TestCase > > That isn't the point. It _is_ in a module already. The 'rubyunit' > > extension hides that fact by aliasing a class name. > > Why is it in a module? Probably for some other benefit, unrelated to > namespaces(?) I can't speak for the original writer, but probably for namespace protection. > (what's the stuff called that looks like MODULE:: ?). Scope resolution. > Now that I'm planning on releasing the lib, I think that people > might use it with other libs, so I'm planning on wrapping the whole > thing in a module. That's a good plan. I'd do just that, and not worry about the other stuff. The testing thing was a slightly special case, indented to make testing a easy and non-threatening as possible. Dave