OK, I accept that methods aren't ordered at run time and, therefore,  
depending on their lexical order is wrong. I have rewritten my test  
case so it has no dependencies on the order of execution.
Nevertheless, Test::Unit does take the trouble to impose an order on  
the test methods. I wonder why?

Regards, Morton

On Aug 31, 2006, at 1:25 AM, Eric Hodel wrote:

> On Aug 30, 2006, at 6:16 PM, Morton Goldberg wrote:
>> If I were implementing something like Test::Unit, as an  
>> application of principle of least surprise, I would want to ensure  
>> Test::Unit preserved the order in which the programmer defined the  
>> tests.
>
> An object's methods don't have an order.
>
> irb(main):001:0> class X; def y; end; end
> => nil
> irb(main):002:0> X.instance_methods(false)
> => ["y"]
> irb(main):003:0> class X; def z; end; end
> => nil
> irb(main):004:0> X.instance_methods(false)
> => ["z", "y"]
> irb(main):005:0> class X; def b; end; end
> => nil
> irb(main):006:0> X.instance_methods(false)
> => ["z", "y", "b"]
>
> -- 
> Eric Hodel - drbrain / segment7.net - http://blog.segment7.net
> This implementation is HODEL-HASH-9600 compliant