Move top-level types into spectator/ sub-directory

This commit is contained in:
Michael Miller 2021-01-09 13:56:32 -07:00
parent 7451769a29
commit fb0423ed02
No known key found for this signature in database
GPG key ID: F9A0C5C65B162436
5 changed files with 14 additions and 14 deletions

View file

@ -1,6 +1,5 @@
require "log"
require "./spectator/includes"
require "./spectator_test_context"
Log.setup_from_env

View file

@ -1,4 +1,10 @@
require "../spectator_context"
# Base class that all test cases run in.
# This type is used to store all test case contexts as a single type.
# The instance must be downcast to the correct type before calling a context method.
# This type is intentionally outside the `Spectator` module.
# The reason for this is to prevent name collision when using the DSL to define a spec.
abstract class SpectatorContext
end
module Spectator
# Base class that all test cases run in.

View file

@ -8,3 +8,4 @@ require "./command_line_arguments_config_source"
require "./config_builder"
require "./config"
require "./dsl"
require "./test_context"

View file

@ -1,6 +1,10 @@
require "./spectator_context"
require "./spectator/dsl"
require "./context"
require "./dsl"
# Class used as the base for all specs using the DSL.
# It adds methods and macros necessary to use the DSL from the spec.
# This type is intentionally outside the `Spectator` module.
# The reason for this is to prevent name collision when using the DSL to define a spec.
class SpectatorTestContext < SpectatorContext
include ::Spectator::DSL::Examples
include ::Spectator::DSL::Groups
@ -19,7 +23,4 @@ class SpectatorTestContext < SpectatorContext
private def subject
_spectator_implicit_subject
end
# def initialize(@spectator_test_values : ::Spectator::TestValues)
# end
end

View file

@ -1,7 +0,0 @@
# Base class that all test cases run in.
# This type is used to store all test case contexts as a single type.
# The instance must be downcast to the correct type before calling a context method.
# This type is intentionally outside the `Spectator` module.
# The reason for this is to prevent name collision when using the DSL to define a spec.
abstract class SpectatorContext
end