[rspec-users] Textmate RSpec Bundle 'it' snippet

Pat Maddox pergesu at gmail.com
Sun Jan 27 02:32:55 EST 2008

On Jan 26, 2008 10:50 PM, Matt Darby <matt at matt-darby.com> wrote:
> It seems to me that the RSpec bundle's 'it' snippet is in need of some love.
> By default, a newly inserted spec passes.

Not if you fill it out...and the BDD way is to write one example at a
time, not a complete spec beforehand.

> This seems odd as it is
> misleading. It also makes it harder find what specs still need to be
> completed if you return to an RSpec module after a break.
> I propose that the 'it' snippet is changed to the following:
> it "${0:should ${1:description}}" ${3:do
>   ${2:pending("Needs to be written")}
> end}
> This tweak simply adds a 'pending' statement as the body of a newly created
> spec. When run, the tester will be alerted to an unfinished test.
> Thoughts?

That's the wonderful thing about TextMate being so flexible, and RSpec
being open source.  You're free to change it on your own machine.
However I'd say that there's no chance this change gets applied to
RSpec trunk, nor should it.


More information about the rspec-users mailing list