On Aug 30, 2006, at 5:03 PM, James Edward Gray II wrote: >>> I also don't believe you have the order correct. Your tests run >>> as expected on my box with no modification to the method names. >>> I haven't gone into the source of Test::Unit to determine why >>> this is, but it could be that the methods are hashed in which >>> case you can't count on any order at all. >> >> I'm not sure what you mean by not correct. My results printout >> speaks for itself, doesn't it? > > Oops, I misunderstood them. My bad. The situation you described > *is* the same on my box. Sorry to spread confusion. Just to make sure I looked at the implementation. It does call sort on the test method names to establish the order for running the test. I can't imagine why it does this. 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. That doesn't mean I'm saying Nathaniel Talbott has erred; he may well have a good reason that simply escapes me. Another thing I gleaned from the code was that it rejects any method with arity other than 0 or -1; i.e, any method that can't be called with __send__(test_name), where test_name matches /^test./. I don't think this is mentioned in the Pickaxe book and it certainly isn't mentioned in the ri documentation, but it explains something else that was niggling me: why Test::Unit was smart enough not to run my test_arg_helper method as a test method. Regards, Morton