|
|
mspec tag [options] (FILE|DIRECTORY|GLOB)+
Ask yourself:
1. What specs to run?
2. How to display the output?
3. What tag action to perform?
4. When to perform it?
What specs to run
-e, --example STR Run examples with descriptions matching STR
-E, --exclude STR Exclude examples with descriptions matching STR
-p, --pattern PATTERN Run examples with descriptions matching PATTERN
-P, --excl-pattern PATTERN Exclude examples with descriptions matching PATTERN
-g, --tag TAG Run examples with descriptions matching ones tagged with TAG
-G, --excl-tag TAG Exclude examples with descriptions matching ones tagged with TAG
-Z, --dry-run Invoke formatters and other actions, but don't execute the specs
How to display their output
-f, --format FORMAT Formatter for reporting: s:specdoc|d:dotted|h:html|u:unitdiff|a:*:spin
-V, --verbose Output the name of each file processed
-m, --marker MARKER Output MARKER for each file processed
--int-spec Control-C interupts the current spec only
What action to perform and when to perform it
-N, --add TAG Add TAG with format 'tag' or 'tag(comment)' (see -Q, -F, -L)
-R, --del TAG Delete TAG (see -Q, -F, -L)
-Q, --pass Apply action to specs that pass (default for --del)
-F, --fail Apply action to specs that fail (default for --add)
-L, --all Apply action to all specs
Help!
-v, --version Show version
-h, --help Show this message
How might this work in the real world?
1. To add the 'fails' tag to failing specs
mspec tag path/to/the_file_spec.rb
2. To remove the 'fails' tag from passing specs
mspec tag --del fails path/to/the_file_spec.rb
|