From: Universe Date: 2001-12-11T14:02:32+09:00 Subject: [ruby-talk:28178] Re: Quantitative Unit-testing? (Re: John Roth dolt ( Re: A challenge to proponents of Unit Testing. ) Ron Jeffries wrote: >On Sun, 02 Dec 2001 18:03:12 -0500, Panu Viljamaa >wrote: > >>Yes I have. What happened was I find it hard to understand how to use a method written by someone else when there is no indication of what kind of arguments should be passed to it. It is also hard to say if it is right or wrong when there is no clearly written contract on "what it should do". This might be specified by some test-case-class somewhere, but I'd rather have 'contract' of the method visible as soon as I view the method's source, so I don't have to go test-case hunting. > >The usual Smalltalk convention is to write a method defintion like >this: > > insert: anObject into: aCollection > >which means about the same thing as > > void insert( Object o, Collection c) > >The name of the method, insert:into: is chosen to reflect what the >method should do. Insert when full, held for deletion, being used in 1 transaction, 2 transactions, 3, 4, none? That's my drift. Elliott -- http://www.radix.net/~universe ~*~ Enjoy! ~*~ Hail OO Modelling! * Hail the Wireless Web! @Elliott 2001 my comments ~ newsgroups+bitnet quote ok