[rspec-users] Something like tags in cucumber

Phillip Koebbe phillipkoebbe at gmail.com
Mon Jan 18 10:06:07 EST 2010

In cucumber, I use tags in a very simple, yet helpful (to me) way: to 
number my scenarios. For example:


Scenario: This is a scenario


Scenario: This is another scenario


Scenario: You get the idea

This allows me to focus in on a single scenario quite easily while I'm 
working on it. Once I have that scenario working correctly, I will run 
the entire feature to make sure nothing else is broken.

I'm finding that I'd like to do something quite similar in RSpec. For 
example, when I'm working on a model spec, I generally have contexts for 
what database fields should exist, what validations should exist, and 
what associations should exist. When I am later adding a couple of 
custom methods to do something, I'd like to be able to run the spec just 
for what I'm presently working on. Is this possible?


More information about the rspec-users mailing list