[rspec-users] Something like tags in cucumber

David Chelimsky dchelimsky at gmail.com
Mon Jan 18 10:21:43 EST 2010


On Mon, Jan 18, 2010 at 9:06 AM, Phillip Koebbe <phillipkoebbe at gmail.com> wrote:
> In cucumber, I use tags in a very simple, yet helpful (to me) way: to number
> my scenarios. For example:
>
> @1
>
> Scenario: This is a scenario
>
> @2
>
> Scenario: This is another scenario
>
> @3
>
> 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?

Not yet, but it will be in rspec-2. Internal syntax will be different,
but we'll try to make the CLI work like cuke's.

Cheers,
David

>
> Peace,
> Phillip


More information about the rspec-users mailing list