mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Remove private nest macro
It was still visible to end users.
This commit is contained in:
parent
b90cc39638
commit
d5cd756882
1 changed files with 5 additions and 9 deletions
|
@ -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 %}
|
||||
|
|
Loading…
Reference in a new issue