diff --git a/src/spectator.cr b/src/spectator.cr index 5e10e0d..c5f68a9 100644 --- a/src/spectator.cr +++ b/src/spectator.cr @@ -1,5 +1,5 @@ require "./spectator/includes" -require "./spectator_test" +require "./spectator_context" # Module that contains all functionality related to Spectator. module Spectator @@ -38,7 +38,7 @@ module Spectator # For more information on how the DSL works, see the `DSL` module. # Root-level class that contains all examples and example groups. - class SpectatorTest + class SpectatorContext # Pass off the description argument and block to `DSL::StructureDSL.describe`. # That method will handle creating a new group for this spec. describe({{description}}) {{block}} diff --git a/src/spectator_test.cr b/src/spectator_test.cr deleted file mode 100644 index a0a202d..0000000 --- a/src/spectator_test.cr +++ /dev/null @@ -1,25 +0,0 @@ -require "./spectator/dsl" - -# Root-level class that all tests inherit from and are contained in. -# This class is intentionally outside of the scope of Spectator, -# so that the namespace isn't leaked into tests unexpectedly. -class SpectatorTest - include ::Spectator::DSL - - def _spectator_implicit_subject - nil - end - - def subject - _spectator_implicit_subject - end - - def initialize(@spectator_test_values : ::Spectator::TestValues) - end - - # Prevent leaking internal values since their types may differ. - # Workaround for: https://gitlab.com/arctic-fox/spectator/-/issues/53 - def inspect(io) - io << self.class - end -end