mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Move code for root back to Spectator#describe
There seems to be a problem using def in block. This broke helper methods and gives the error: `can't declare def dynamically`.
This commit is contained in:
parent
9ba3fc898b
commit
87d9cc438f
2 changed files with 5 additions and 8 deletions
|
@ -5,7 +5,11 @@ module Spectator
|
||||||
VERSION = "0.1.0"
|
VERSION = "0.1.0"
|
||||||
|
|
||||||
macro describe(what, &block)
|
macro describe(what, &block)
|
||||||
DSL.root({{what}}) {{block}}
|
module SpectatorExamples
|
||||||
|
include ::Spectator::DSL::StructureDSL
|
||||||
|
|
||||||
|
describe({{what}}) {{block}}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
at_exit do
|
at_exit do
|
||||||
|
|
|
@ -2,12 +2,5 @@ require "./dsl/*"
|
||||||
|
|
||||||
module Spectator
|
module Spectator
|
||||||
module DSL
|
module DSL
|
||||||
macro root(what, &block)
|
|
||||||
module SpectatorExamples
|
|
||||||
include StructureDSL
|
|
||||||
|
|
||||||
describe({{what}}) {{block}}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue