[rspec-users] artificial sugar causes cancer

Chris Anderson jchris at mfdz.com
Mon Nov 20 14:12:16 EST 2006


> >> @bdd_framework.should_be_adopted_quickly #current
> > >> @bdd_framework.should_be :adopted_quickly #proposed
> > >>
> > >
> > > I prefer the latter too
> >
> > Dude +1, the latter is so preferred.
>
>
symbol arguments ++ for sure!


I'm mostly indifferent/favoring the proposed changes, but note that for the
> above example, might it be confusing to drop the punctuation?
>
> @bdd_framework.should_be :adopted_quickly vs @bdd_framework.should_be
> :adopted_quickly?
>
>

Nick's point is interesting - automatically adding the '?' seems a little
magical. But the more I think about it, the more it seems like the right
thing to do. If I want to expect a value from a non-question-mark method, I
can always write:

my_object.method_without_question_mark.should_be true

Which is a little clearer, at least to me.

Three cheers for no more method missing!

-- 
Chris Anderson
http://jchris.mfdz.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20061120/bb2870a6/attachment.html 


More information about the rspec-users mailing list