On 11/6/06, Wilson Bilkovich <wilsonb / gmail.com> wrote:
> On 11/6/06, Trans <transfire / gmail.com> wrote:
> >
> > David Chelimsky wrote:
> > > The RSpec Development Team is pleased to announce the release of RSpec 0.7.0.
> > >
> > > You can get it from http://rubyforge.org/frs/?group_id=797, or "gem
> > > install rspec"
> > >
> > > Note that this release is NOT completely backwards compatible. If you
> > > are already using a prior release of rspec, see
> > > http://rspec.rubyforge.org/upgrade.html before you upgrade.
> > >
> > > RSpec is the original BDD framework for Ruby. This release includes a
> > > number of significant improvements, most notably in the areas of
> > > mocks/stubs and the RSpec on Rails plugin. Learn more at:
> > >
> > > http://rspec.rubyforge.org/documentation/mocks/index.html
> > > http://rspec.rubyforge.org/documentation/rails/index.html
> > >
> > > See http://rspec.rubyforge.org/changes.html for a complete list of changes.
> > >
> > > Thanks to all who contributed to this release, and to who all will
> > > contribute in the future by using it and providing us with valuable
> > > feedback.
> >
> > RSpec is really looking great. I'm curious though, why offer:
> >
> >   actual.should == <value> #passes if actual == <value>
> >
> > Yet not extrapolate this techniquw to other methods? I've played with
> > this approach myself and it would seem to greatly simplify the
> > underlying code and be most intuitive. Just to be clear, instead of
> >
> >   actual.should_equal <value> #passes if actual.equal? <value>
> >   actual.should_not_equal <value> #passes if !actual.equal? <value>
> >
> >   actual.should_eql <value> #passes if actual.eql? <value>
> >   actual.should_not_eql <value> #passes if !actual.eql? <value>
> >
> > use
> >
> >   actual.should.equal? <value> #passes if actual.equal? <value>
> >   actual.should_not.equal? <value> #passes if !actual.equal? <value>
> >
> >   actual.should.eql? <value> #passes if actual.eql? <value>
> >   actual.should_not.eql? <value> #passes if !actual.eql? <value>
> >
> > This can be extended to other methods as well. For example:
> >
> >   actual.should.raise
> >
>
> This already works, actually. :)

It does, but that's because of  the current underlying implementation.
It is undocumented and officially unsupported, so use it at your own
risk.

That said, I honestly don't see it ever changing.

Cheers,
David