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:
Michael Miller 2018-09-23 12:02:51 -06:00
parent 9ba3fc898b
commit 87d9cc438f
2 changed files with 5 additions and 8 deletions

View File

@ -5,7 +5,11 @@ module Spectator
VERSION = "0.1.0"
macro describe(what, &block)
DSL.root({{what}}) {{block}}
module SpectatorExamples
include ::Spectator::DSL::StructureDSL
describe({{what}}) {{block}}
end
end
at_exit do

View File

@ -2,12 +2,5 @@ require "./dsl/*"
module Spectator
module DSL
macro root(what, &block)
module SpectatorExamples
include StructureDSL
describe({{what}}) {{block}}
end
end
end
end