From: Wilson Bilkovich Date: 2006-11-07T06:25:39+09:00 Subject: Re: RSpec 0.7.0 Released On 11/6/06, Trans 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 == #passes if actual == > > 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 #passes if actual.equal? > actual.should_not_equal #passes if !actual.equal? > > actual.should_eql #passes if actual.eql? > actual.should_not_eql #passes if !actual.eql? > > use > > actual.should.equal? #passes if actual.equal? > actual.should_not.equal? #passes if !actual.equal? > > actual.should.eql? #passes if actual.eql? > actual.should_not.eql? #passes if !actual.eql? > > This can be extended to other methods as well. For example: > > actual.should.raise > This already works, actually. :)