[ANN] RSpec 0.7.0 Released

  • Thread starter David Chelimsky
  • Start date
D

David Chelimsky

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
 
T

Trans

David said:
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

My 2c.

Thanks,
T.
 
W

Wilson Bilkovich

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. :)
 
D

David Chelimsky

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
 
D

David Chelimsky

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

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top