mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Move placeholder initializer up a level
This commit is contained in:
parent
cf6cf5db59
commit
01c4b78716
2 changed files with 6 additions and 6 deletions
|
@ -41,6 +41,12 @@ module Spectator
|
||||||
# Include the DSL for creating groups, example, and more.
|
# Include the DSL for creating groups, example, and more.
|
||||||
include ::Spectator::DSL::StructureDSL
|
include ::Spectator::DSL::StructureDSL
|
||||||
|
|
||||||
|
# Placeholder initializer.
|
||||||
|
# This is needed because examples and groups call super in their initializer.
|
||||||
|
# Those initializers pass the sample values upward through their hierarchy.
|
||||||
|
def initialize(_sample_values : ::Spectator::Internals::SampleValues)
|
||||||
|
end
|
||||||
|
|
||||||
# Pass off the "what" argument and block to `DSL::StructureDSL.describe`.
|
# Pass off the "what" argument and block to `DSL::StructureDSL.describe`.
|
||||||
# That method will handle creating a new group for this spec.
|
# That method will handle creating a new group for this spec.
|
||||||
describe({{what}}) {{block}}
|
describe({{what}}) {{block}}
|
||||||
|
|
|
@ -151,12 +151,6 @@ module Spectator::DSL
|
||||||
# Sample values are a collection of test values that can be used in examples.
|
# Sample values are a collection of test values that can be used in examples.
|
||||||
# For more information, see `Internals::SampleValues`.
|
# For more information, see `Internals::SampleValues`.
|
||||||
module StructureDSL
|
module StructureDSL
|
||||||
# Placeholder initializer.
|
|
||||||
# This is needed because examples and groups call super in their initializer.
|
|
||||||
# Those initializers pass the sample values upward through their hierarchy.
|
|
||||||
def initialize(sample_values : Internals::SampleValues)
|
|
||||||
end
|
|
||||||
|
|
||||||
# Creates a new example group to describe a component.
|
# Creates a new example group to describe a component.
|
||||||
# The *what* argument describes "what" is being tested.
|
# The *what* argument describes "what" is being tested.
|
||||||
# Additional example groups and DSL may be nested in the block.
|
# Additional example groups and DSL may be nested in the block.
|
||||||
|
|
Loading…
Reference in a new issue