mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Include ExampleDSL at root
Will need to check if methods can run in that scope.
This commit is contained in:
parent
64045171c2
commit
4ecc2c6004
2 changed files with 2 additions and 6 deletions
|
@ -38,8 +38,8 @@ module Spectator
|
||||||
|
|
||||||
# Root-level class that contains all examples and example groups.
|
# Root-level class that contains all examples and example groups.
|
||||||
class SpectatorExamples
|
class SpectatorExamples
|
||||||
# Include the DSL for creating groups, example, and more.
|
include ::Spectator::DSL::StructureDSL # Include the DSL for creating groups, example, and more.
|
||||||
include ::Spectator::DSL::StructureDSL
|
include ::Spectator::DSL::ExampleDSL # Mix in methods and macros specifically for example DSL.
|
||||||
|
|
||||||
# Placeholder initializer.
|
# Placeholder initializer.
|
||||||
# This is needed because examples and groups call super in their initializer.
|
# This is needed because examples and groups call super in their initializer.
|
||||||
|
|
|
@ -241,7 +241,6 @@ module Spectator::DSL
|
||||||
# Class for the context.
|
# Class for the context.
|
||||||
# The class uses a generated unique name.
|
# The class uses a generated unique name.
|
||||||
class Context%context < {{@type.id}}
|
class Context%context < {{@type.id}}
|
||||||
|
|
||||||
# Check if `what` looks like a type.
|
# Check if `what` looks like a type.
|
||||||
# If it is, add the `#described_class` and `subject` methods.
|
# If it is, add the `#described_class` and `subject` methods.
|
||||||
# At the time of writing this code,
|
# At the time of writing this code,
|
||||||
|
@ -1577,9 +1576,6 @@ module Spectator::DSL
|
||||||
private macro _spectator_test(class_name, run_method_name)
|
private macro _spectator_test(class_name, run_method_name)
|
||||||
# Wrapper class for isolating the test code.
|
# Wrapper class for isolating the test code.
|
||||||
class {{class_name.id}} < {{@type.id}}
|
class {{class_name.id}} < {{@type.id}}
|
||||||
# Mix in methods and macros specifically for example DSL.
|
|
||||||
include ::Spectator::DSL::ExampleDSL
|
|
||||||
|
|
||||||
# Initializer that accepts sample values.
|
# Initializer that accepts sample values.
|
||||||
# The sample values are passed upward to the group modules.
|
# The sample values are passed upward to the group modules.
|
||||||
# Any module that adds sample values can pull their values from this instance.
|
# Any module that adds sample values can pull their values from this instance.
|
||||||
|
|
Loading…
Reference in a new issue