mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Fix example methods overriding previously defined methods
This commit is contained in:
parent
27875631d3
commit
788b12a8bc
2 changed files with 3 additions and 3 deletions
|
@ -7,7 +7,7 @@ module Spectator::DSL
|
|||
macro {{name.id}}(what = nil, &block)
|
||||
\{% raise "Cannot use '{{name.id}}' inside of a test block" if @def %}
|
||||
|
||||
def %test
|
||||
def \%test
|
||||
\{{block.body}}
|
||||
end
|
||||
|
||||
|
@ -15,7 +15,7 @@ module Spectator::DSL
|
|||
_spectator_example_name(\{{what}}),
|
||||
::Spectator::Source.new(\{{block.filename}}, \{{block.line_number}}),
|
||||
\{{@type.name}}.new
|
||||
) { |example, context| context.as(\{{@type.name}}).%test }
|
||||
) { |example, context| context.as(\{{@type.name}}).\%test }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ module Spectator::DSL
|
|||
macro {{name.id}}(what, &block)
|
||||
\{% raise "Cannot use '{{name.id}}' inside of a test block" if @def %}
|
||||
|
||||
class Group%group < \{{@type.id}}
|
||||
class Group\%group < \{{@type.id}}
|
||||
_spectator_group_subject(\{{what}})
|
||||
|
||||
::Spectator::DSL::Builder.start_group(
|
||||
|
|
Loading…
Reference in a new issue