Remove private nest macro

It was still visible to end users.
This commit is contained in:
Michael Miller 2018-08-24 15:17:05 -06:00
parent b90cc39638
commit d5cd756882

View file

@ -6,7 +6,11 @@ end
module Spectator
module DSL
private macro nest(type, what, &block)
macro describe(what, type = "Describe", &block)
context({{what}}, {{type}}) {{block}}
end
macro context(what, type = "Context", &block)
{% safe_name = what.id.stringify.gsub(/\W+/, "_") %}
{% module_name = (type.id + safe_name.camelcase).id %}
module {{module_name.id}}
@ -19,14 +23,6 @@ module Spectator
end
end
macro describe(what, &block)
nest("Describe", {{what}}) {{block}}
end
macro context(what, &block)
nest("Context", {{what}}) {{block}}
end
macro it(description, &block)
{% safe_name = description.id.stringify.gsub(/\W+/, "_") %}
{% class_name = (safe_name.camelcase + "Example").id %}