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 ::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`.
|
||||
# That method will handle creating a new group for this spec.
|
||||
describe({{what}}) {{block}}
|
||||
|
|
|
@ -151,12 +151,6 @@ module Spectator::DSL
|
|||
# Sample values are a collection of test values that can be used in examples.
|
||||
# For more information, see `Internals::SampleValues`.
|
||||
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.
|
||||
# The *what* argument describes "what" is being tested.
|
||||
# Additional example groups and DSL may be nested in the block.
|
||||
|
|
Loading…
Reference in a new issue