Some fixes

This commit is contained in:
Michael Miller 2019-09-11 22:21:06 -06:00
parent a100191875
commit 64166d1c36

View file

@ -1,4 +1,5 @@
require "./example_component" require "./example_component"
require "./test_wrapper"
module Spectator module Spectator
# Base class for all types of examples. # Base class for all types of examples.
@ -11,7 +12,7 @@ module Spectator
getter group : ExampleGroup getter group : ExampleGroup
# Retrieves the internal wrapped instance. # Retrieves the internal wrapped instance.
private getter @test_wrapper : TestWrapper private getter test_wrapper : TestWrapper
# Source where the example originated from. # Source where the example originated from.
def source def source
@ -22,6 +23,11 @@ module Spectator
@test_wrapper.description @test_wrapper.description
end end
def symbolic?
description = @test_wrapper.description
description.start_with?('#') || description.start_with?('.')
end
# Runs the example code. # Runs the example code.
# A result is returned, which represents the outcome of the test. # A result is returned, which represents the outcome of the test.
# An example can be run only once. # An example can be run only once.