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.
|
||||
class SpectatorExamples
|
||||
# Include the DSL for creating groups, example, and more.
|
||||
include ::Spectator::DSL::StructureDSL
|
||||
include ::Spectator::DSL::StructureDSL # Include the DSL for creating groups, example, and more.
|
||||
include ::Spectator::DSL::ExampleDSL # Mix in methods and macros specifically for example DSL.
|
||||
|
||||
# Placeholder initializer.
|
||||
# This is needed because examples and groups call super in their initializer.
|
||||
|
|
|
@ -241,7 +241,6 @@ module Spectator::DSL
|
|||
# Class for the context.
|
||||
# The class uses a generated unique name.
|
||||
class Context%context < {{@type.id}}
|
||||
|
||||
# Check if `what` looks like a type.
|
||||
# If it is, add the `#described_class` and `subject` methods.
|
||||
# At the time of writing this code,
|
||||
|
@ -1577,9 +1576,6 @@ module Spectator::DSL
|
|||
private macro _spectator_test(class_name, run_method_name)
|
||||
# Wrapper class for isolating the test code.
|
||||
class {{class_name.id}} < {{@type.id}}
|
||||
# Mix in methods and macros specifically for example DSL.
|
||||
include ::Spectator::DSL::ExampleDSL
|
||||
|
||||
# Initializer that accepts sample values.
|
||||
# The sample values are passed upward to the group modules.
|
||||
# Any module that adds sample values can pull their values from this instance.
|
||||
|
|
Loading…
Reference in a new issue