RSpec 0.7.0 Released

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.

Happy designing!
The RSpec Development Team

David C. wrote:

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

My 2c.

Thanks,
T.

On 11/6/06, Trans [email protected] wrote:

contribute in the future by using it and providing us with valuable
actual.should_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. :slight_smile:

On 11/6/06, Wilson B. [email protected] wrote:

http://rspec.rubyforge.org/upgrade.html before you upgrade.
Thanks to all who contributed to this release, and to who all will

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. :slight_smile:

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

On 11/6/06, Trans [email protected] wrote:

contribute in the future by using it and providing us with valuable
actual.should_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

My 2c.

That’s hilarious! You’ve missed a lot of history. No offense. We went
through a lot of song and dance about this, that’s all.

Originally, all of the methods were should_equal, should_match, etc.
Then I came up w/ this dumb idea to add should_be_anything and have it
call .anything? under the hood. Everybody loved the idea, but HATED
the dots!!!

Then Rich Kilmer introduced the underscore sugar that lets you say
“should_do_stuff” but under the hood it called “should.do.stuff”.

Ah, but then it still wasn’t over! We started running into collision
after collision on methods that called in the middle of that stack.
And so on and so on and so on.

At this point it’s pretty stable. Under the hood, it really does use
something that pans out to object.should.equal value. So
actual.should_not.equal expected will probably work - but I doubt
we’ll be supporting that officially.

Cheers,
David