spockframework/spock — pull request #29 by grantcurrey (2013-12-12 00:43:00+00:00)
Title: Adding tag support

A new extension to bring the concept of cucumber tags into spock. This extension allows you to do the following:

```java
MyTest extends Specification{
@Tags(["PROD"])
def "some test"(){

}

def "another test"(){

}
}
```
or
```java
@Tags(["JIRA-1234"])
MyTest extends Specification{
def "some test"(){

}

def "another test"(){

}
}
```

You can then pass a vm arg when running junit to run just a subset of tests, if you so desire:

```
-Dtags=PROD
```

or

```
-Dtags=UAT,JIRA-1234
```

If you do not supply the vm arg, all tests will run. If you supply the VM arg, only specifications or features that match the tags supplied in the VM arg will execute.