[rspec-users] Unimplemented Spec idea

Scott Taylor mailing_lists at railsnewbie.com
Tue Jul 31 22:10:11 EDT 2007


I absolutely love the unimplemented spec idea, and tend to use it a  
lot.  But occasionally it gets in my way, when I rush to write a  
spec, and then want to change it to a non-implemented spec.  My  
normal solution is to comment out the do...end block.  Is there a  
better way?

Stealing an idea from Dan North, how about something like this:

it "should do such and such", :pending => true do
    # unimplemented spec goes here
end

To make the spec run, simply remove the :pending key.  I'm sure this  
would be rather trivial to implement as well.

Thoughts?

Scott



More information about the rspec-users mailing list