On Jan 9, 2008 7:12 AM, Stefan Magnus Landrø <[EMAIL PROTECTED]> wrote:
>
> 2008/1/9, Kerry Buckley < [EMAIL PROTECTED]>:
>
> > On Jan 9, 2008 10:01 AM, Stefan Magnus Landrø < [EMAIL PROTECTED]>
> wrote:
> > > I totally agree with you, David!
> > >
> > > For quite a while I was testing all my methods (even had to declare them
> > > protected/package scope in java!), but I realized that I was getting
> into a
> > > lot of trouble. Now I've shifted to testing functionality in stead of
> > > methods.
> > >
> > > Now, sometimes you might end up having small methods (typically a result
> of
> > > refactoring) that are being used by several clients. In that case you
> should
> > > start testing those methods, since they actually represent real business
> > > logic.
> >
> > I wonder whether that is a smell indicating that the functionality in
> > those methods really belongs in its own class?

> Well, I think it all depends on the scenario - but in a lot of cases it
> should absolutely be considered a code-smell.

Keep in mind that a code smell is an indicator, but not a dictator. It
is supposed to draw your attention but you still have to consider the
pros and cons and make a reasoned decision.

Cheers,
David
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to