mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Get harness compiling again
This commit is contained in:
parent
175ce8f293
commit
0992bad7eb
1 changed files with 10 additions and 4 deletions
|
@ -15,18 +15,20 @@ module Spectator
|
|||
# This sets up the harness so that the test code can use it.
|
||||
# The framework does the following:
|
||||
# ```
|
||||
# result = Harness.run { delegate.call(example) }
|
||||
# result = Harness.run { run_example_code }
|
||||
# # Do something with the result.
|
||||
# ```
|
||||
#
|
||||
# Then from the test code, the harness can be accessed via `.current` like so:
|
||||
# ```
|
||||
# harness = ::Spectator::Harness.current
|
||||
# # Do something with the harness.
|
||||
# ```
|
||||
#
|
||||
# Of course, the end-user shouldn't see this or work directly with the harness.
|
||||
# Instead, methods the user calls can access it.
|
||||
# For instance, an assertion reporting a result.
|
||||
private class Harness
|
||||
# Instead, methods the test calls can access it.
|
||||
# For instance, an expectation reporting a result.
|
||||
class Harness
|
||||
# Retrieves the harness for the current running example.
|
||||
class_getter! current : self
|
||||
|
||||
|
@ -54,6 +56,10 @@ module Spectator
|
|||
translate(*outcome)
|
||||
end
|
||||
|
||||
def report(expectation)
|
||||
# TODO
|
||||
end
|
||||
|
||||
# Stores a block of code to be executed later.
|
||||
# All deferred blocks run just before the `#run` method completes.
|
||||
def defer(&block) : Nil
|
||||
|
|
Loading…
Reference in a new issue