[Rspec-devel] a commitment to underscores

aslak hellesoy aslak.hellesoy at gmail.com
Mon Jul 31 07:06:06 EDT 2006

On 7/31/06, David Chelimsky <dchelimsky at gmail.com> wrote:
> If we're really committed to underscores, I think we need to draw the
> line and really commit to it. Right now, there are numerous methods
> like this:
> def an
>   self
> end
> This is there to support syntax like this:
> 37.should.be.an.instance.of Fixnum
> I'd propose that since the only use of "an" is in the context of
> "an_instance_of" that we could clean up the should helper (and family)
> a bit by creating underscored methods like an_instance_of and at_least
> and at_most (rather than at, least and most), etc.
> This would mean that we officially stop supporting dots, but it also
> means that we can't accidentally word things like this:
> collection.should_have_most(3).entries #missing "at"
> Thoughts?

+1 if we can reduce some of the magic

> David
> _______________________________________________
> Rspec-devel mailing list
> Rspec-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-devel

More information about the Rspec-devel mailing list