[rspec-users] How do you use pending in RSpec?

Bill Venners bill at artima.com
Fri Mar 13 12:07:52 EDT 2009

Hi Matt and others,

Thanks for your replies. I think I've settled on just using two of
RSpec's pending forms in ScalaTest. If you want to write out a few
spec texts before writing the examples, you'd put pending in parens
where you'd normally put the block of example code:

it("should do something") (pending)

it("should do something else") (pending)

If something breaks during refactoring, you can either ignore the
whole thing by changing it to ignore like this (which already is

ignore("should do something") {
  // ...

Or by puttting a pending with a string inside the example block of code:

it("should do something") {
  // ...
  pending("this won't start working again until I...")
  // ...

But I'll leave out the pending form that takes a block.

I appreciate the feedback.



On Fri, Mar 13, 2009 at 8:07 AM, Matt Wynne <matt at mattwynne.net> wrote:
> On 12 Mar 2009, at 23:23, Bill Venners wrote:
>> I guess I'm curious:
>> 1) How important is it to you to be able to just "strike out" the
>> lines of code within an example that are failing (as you can with
>> RSpec's #3 pending form), versus just "striking out" the entire
>> example as you can with ignore in ScalaTest.
> I don't personally ever strike out parts of an example - all or nothing
>> 2) How important is it to you to be able to add a string message to
>> your stricken code, as you can with either #2 or #3 in RSpec? How does
>> that string help you?
> Very important - it's like a TODO.
> Matt Wynne
> http://blog.mattwynne.net
> http://www.songkick.com
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

More information about the rspec-users mailing list