Nathaniel Talbott <nathaniel / talbott.ws> wrote
>Ah, but JUnit uses setUp... two words. So which is the "xUnit way?"


As a recovering C++/Java programmer I have to admit to having written a
lot of reallyHardToReadNames in the past, but I'm finally getting used to
the_ruby_way_of_doing_things.

Personally I'd much prefer Test::Unit to be consistent with the rest of
Ruby rather than with the C++/Java naming conventions. Somehow I'd never
be able to convince myself that POLS means that if it is in the core of
Ruby I use an underscore but for Test::Unit I have to use camelCase.

So I'll vote for setUp when someone goes to the trouble of converting the
rest of Ruby to remove the underscores. I wonder how much code would be
affected if we renamed #is_a? to #isA? and #to_s to #toS :-)

Having said that just using #setup instead of #set_up wouldn't be too bad,
but #teardown does look uglier than #tear_down, so for consistency I
prefer #set_up

Pete
----
Pete McBreen, McBreen.Consulting , Cochrane, AB
email: petemcbreen / acm.org    http://www.mcbreen.ab.ca/

Author, "Software Craftsmanship The New Imperative"
Addison-Wesley (C) 2002
http://www.amazon.com/exec/obidos/ASIN/0201733862
Finalist for the 2002 Jolt Awards