shard-spectator/src/spectator/example_context_method.cr

11 lines
401 B
Crystal
Raw Normal View History

2020-09-06 16:31:23 +00:00
require "./context"
module Spectator
# Encapsulates a method in a test context.
# This could be used to invoke a test case or hook method.
# The context is passed as an argument.
2020-11-07 21:43:59 +00:00
# The proc should downcast the context instance to the desired type and call a method on that context.
2020-09-06 16:31:23 +00:00
# The current example is also passed as an argument.
alias ExampleContextMethod = Example, Context ->
end