Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Fix --tag documentation to avoid confusing "filter" references. #2090

Merged
merged 1 commit into from
Oct 14, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions features/command_line/tag.feature
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
Feature: `--tag` option

Use the `--tag` (or `-t`) option to filter the examples by tags.
Use the `--tag` (or `-t`) option to run examples that match a specified tag.
The tag can be a simple `name` or a `name:value` pair.

The tag can be a simple `name` or a `name:value` pair. In the first case,
examples with `:name => true` will be filtered. In the second case, examples
with `:name => value` will be filtered, where `value` is always a string. In
both cases, `name` is converted to a symbol.

Filters are represented internally as a hash, which means that you can't
specify multiple filters for the same key. If you try to exclude `:name => 'foo'`
and `:name => 'bar'`, you will only end up excluding `:name => 'bar'`.
If a simple `name` is supplied, only examples with `:name => true` will run.
If a `name:value` pair is given, examples with `name => value` will run,
where `value` is always a string. In both cases, `name` is converted to a symbol.

Tags can also be used to exclude examples by adding a `~` before the tag. For
example `~tag` will exclude all examples marked with `:tag => true` and
example, `~tag` will exclude all examples marked with `:tag => true` and
`~tag:value` will exclude all examples marked with `:tag => value`.

Filtering by tag uses a hash internally, which means that you can't specify
multiple filters for the same key. For instance, if you try to exclude
`:name => 'foo'` and `:name => 'bar'`, you will only end up excluding
`:name => 'bar'`.

To be compatible with the Cucumber syntax, tags can optionally start with an
`@` symbol, which will be ignored.

Expand Down