Move placeholder initializer up a level

This commit is contained in:
Michael Miller 2019-08-15 16:43:25 -06:00
parent cf6cf5db59
commit 01c4b78716
2 changed files with 6 additions and 6 deletions

View file

@ -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}}

View file

@ -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.