Skip to content

Instantly share code, notes, and snippets.

@benmills
Created November 4, 2011 01:54
Show Gist options
  • Save benmills/1338490 to your computer and use it in GitHub Desktop.
Save benmills/1338490 to your computer and use it in GitHub Desktop.
// You can add tags to describe blocks
describe("Bar", tags("version": "0.5.0"),
it("has a foo",
Bar foo will == "foo"
)
)
describe("Foo",
// You can also add them to specific tests
it("has a bar", tags("version": "1.0.4"),
Foo bar will == "bar"
)
it("has a baz",
Foo baz will == "baz"
)
)
// You would run these like so: `willful -f version:1.0.4`
// One limitation right now is if you ran this file filtering for version 0.5.0
// it would still run 'has a foo' because if the runner sees the describe block
// has a tag that matchs the filter it will not look at any of the test's tags
describe("Bar", tags("version": "0.5.0"),
it("has a foo", tags("version": "1.0.4"),
Bar foo will == "foo"
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment