mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Add docs
This commit is contained in:
parent
55b655e90a
commit
3d67c45a22
1 changed files with 6 additions and 1 deletions
|
@ -1,17 +1,22 @@
|
|||
module Spectator
|
||||
# Encapsulates the tests to run and additional properties about them.
|
||||
# Use `#each` to enumerate over all tests in the suite.
|
||||
class TestSuite
|
||||
include Enumerable(Example)
|
||||
|
||||
# Creates the test suite.
|
||||
# The example `group` provided will be run.
|
||||
def initialize(@group : ExampleGroup)
|
||||
end
|
||||
|
||||
def each
|
||||
# Yields each example in the test suite.
|
||||
def each : Nil
|
||||
iterator.each do |example|
|
||||
yield example
|
||||
end
|
||||
end
|
||||
|
||||
# Creates an iterator for the example group.
|
||||
private def iterator
|
||||
ExampleIterator.new(@group)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue