[Rubytests-devel] Added tests to TestObject, TestNilClass
Charles O Nutter
headius at gmail.com
Mon Nov 22 10:12:23 EST 2004
Ahh, good point about the order of args to assert_equal; I'll fix that.
I think any methods specifically defined on Object should be tested in
TestObject; if Object ever needed to change, you'd want TestObject to
break, not some other test (although obviously it might be difficult
to prevent others from failing, of course).
On Mon, 22 Nov 2004 11:41:40 +0100 (MET), Johan Holmberg
<holmberg at iar.se> wrote:
> On Sun, 21 Nov 2004, Charles O Nutter wrote:
> > TestObject:
> > test_instance_variable_get (1.8)
> > test_instance_variable_set (1.8)
> > Any specific reason why TestObject is otherwise completely empty?
> Maybe the tests are in "TestKernel.rb" ?
> I can see a "test_instance_variables" there, but not the methods you
> added to "TestObject.rb". I haven't looked in detail at
> "TestKernel.rb" but I remember from the PickAxe that the distinction
> between "Object" and "Kernel" is a bit blurry.
> A comment about the methods you added:
> Shouldn't the "expected value" be the first argument?
> All of Test::Unit is built on that convention, and I think error
> messages will be better if the assert_* methods are called that way.
> Eg. using:
> assert_equal("c", @test_class.instance_variable_get("@var1"))
> instead of
> assert_equal(@test_class.instance_variable_get("@var1"), "c")
> /Johan Holmberg
> Rubytests-devel mailing list
> Rubytests-devel at rubyforge.org
More information about the Rubytests-devel