[Rspec-devel] dots vs underscores tally

David Chelimsky dchelimsky at gmail.com
Wed Jun 7 18:14:01 EDT 2006


On 6/7/06, aslak hellesoy <aslak.hellesoy at gmail.com> wrote:
> On 6/7/06, David Chelimsky <dchelimsky at gmail.com> wrote:
> > On 6/7/06, aslak hellesoy <aslak.hellesoy at gmail.com> wrote:
> > My thinking is that if we're committed to underscores, then that's
> > what we should support. The tests should change to use underscores.
> > I'll be glad to change them myself.
>
> > Doing this will give us more freedom in implementation. For example,
> > right now the HaveHelper has methods "at" and "least" and "most". If
> > we abandon official dot-support, there's no reason we can't change
> > that to "at_least" and "at_most", at which point the code speaks a bit
> > better IMO.
> >
> > Thoughts?
> >
>
> I think the internal implementation with chained helper is great, so I
> hope you don't
> want to change that.

Not entirely. The chained helper is what gives us arbitrary
predicates, reduces the changes to Object, etc. I'm just saying that
for specific cases it might simplify the code to use "_".

>
> I suppose we could implement at_least and at_most and tweak sugar.rb
> to account for those special cases.

If sugar needs tweaking to handle these, then I withdraw my suggestion
(vis a vis changing implementation).

However, that's based on rspec as it is today. I still think that with
a long rspec life in mind, that we're shooting ourselves in our future
feet by supporting both "_" and "."

>
> Aslak


More information about the Rspec-devel mailing list