[Rspec-devel] a commitment to underscores

David Chelimsky dchelimsky at gmail.com
Mon Jul 31 05:19:55 EDT 2006


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?

David


More information about the Rspec-devel mailing list