mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Create test instance when example is created
This exposes errors in the framework instead of delaying them until the test runs.
This commit is contained in:
parent
94e2f54713
commit
03a8efd7f8
1 changed files with 6 additions and 1 deletions
|
@ -155,8 +155,13 @@ module Spectator
|
|||
end
|
||||
|
||||
class Example%example < ::Spectator::RunnableExample
|
||||
def initialize(group : ::Spectator::ExampleGroup, locals : Hash(Symbol, ::Spectator::ValueWrapper))
|
||||
super
|
||||
@instance = Wrapper%example.new(locals)
|
||||
end
|
||||
|
||||
protected def run_instance
|
||||
Wrapper%example.new(locals).%run
|
||||
@instance.%run
|
||||
end
|
||||
|
||||
def description
|
||||
|
|
Loading…
Reference in a new issue