@@ -168,18 +168,22 @@ defmodule ExUnit.Case do
168
168
169
169
* `:test_pid` - the PID of the testing process
170
170
171
- * `:test_type` - the test type used when printing test results.
172
- It is set by ExUnit to `:test`, `:doctest` and so on, but is customizable.
171
+ * `:test_type` - the test type used when printing test results. It can also
172
+ be used for filtering. It is set by ExUnit to `:test`, `:doctest`, or
173
+ the equivalent type given to `register_test/6`
173
174
174
175
* `:describe` - the describe block the test belongs to (if in a describe)
175
176
176
- * `:describe_line` - the line the describe block begins on (if in a describe)
177
+ * `:describe_line` - the line the describe block begins on (if in a describe).
178
+ It can be used to run all tests in the describe block given by line
177
179
178
180
* `:doctest` - the module or the file being doctested (if a doctest)
179
181
180
- * `:doctest_data` - additional metadata about doctests (if a doctest)
182
+ * `:doctest_data` - additional metadata about doctests stored in a map,
183
+ such as the `:end_line`, available for reflection purposes (if a doctest)
181
184
182
- * `:doctest_line` - the line the doctest was defined (if a doctest)
185
+ * `:doctest_line` - the line the doctest was defined (if a doctest).
186
+ It can be used to run a doctest defined at the given source line
183
187
184
188
The following tags customize how tests behave:
185
189
@@ -658,12 +662,11 @@ defmodule ExUnit.Case do
658
662
end
659
663
660
664
@ doc """
661
- Registers a function to run as part of this case .
665
+ Registers a function to run as a test for this module .
662
666
663
- This is used by third-party projects, like QuickCheck, to
664
- implement macros like `property/3` that works like `test`
665
- but instead defines a property. See `test/3` implementation
666
- for an example of invoking this function.
667
+ This is used by third-party projects to implement macros like
668
+ `property/3` that works like `test` but instead defines a property.
669
+ See `test/3` implementation for an example of invoking this function.
667
670
668
671
The test type will be converted to a string and pluralized for
669
672
display. You can use `ExUnit.plural_rule/2` to set a custom
0 commit comments