mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Change example wrapper type to a class
Fixes issue #11. Variables (defined with let) were getting re-created between the hooks and the example code. This was due to a separate struct value being returned for each fetch to the wrapped example instance. In turn, the wrappers for variables were reset for each fetch.
This commit is contained in:
parent
ed2614da22
commit
ca564619ad
1 changed files with 1 additions and 1 deletions
|
@ -1537,7 +1537,7 @@ module Spectator::DSL
|
||||||
# The block passed to this macro is the actual test code.
|
# The block passed to this macro is the actual test code.
|
||||||
private macro _spectator_test(class_name, run_method_name)
|
private macro _spectator_test(class_name, run_method_name)
|
||||||
# Wrapper class for isolating the test code.
|
# Wrapper class for isolating the test code.
|
||||||
struct {{class_name.id}}
|
class {{class_name.id}}
|
||||||
# Mix in methods and macros specifically for example DSL.
|
# Mix in methods and macros specifically for example DSL.
|
||||||
include ::Spectator::DSL::ExampleDSL
|
include ::Spectator::DSL::ExampleDSL
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue