mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Start reactivating runner
This commit is contained in:
parent
579fcacfde
commit
ec6018bed4
3 changed files with 20 additions and 3 deletions
|
@ -93,8 +93,8 @@ module Spectator
|
||||||
|
|
||||||
# Builds the tests and runs the framework.
|
# Builds the tests and runs the framework.
|
||||||
private def run
|
private def run
|
||||||
# Build the test suite and run it.
|
# Build the test spec and run it.
|
||||||
# suite = ::Spectator::SpecBuilder.build(config.example_filter)
|
spec = ::Spectator::DSL::Builder.build
|
||||||
# Runner.new(suite, config).run
|
# Runner.new(suite, config).run
|
||||||
true
|
true
|
||||||
rescue ex
|
rescue ex
|
||||||
|
|
|
@ -28,6 +28,8 @@ module Spectator
|
||||||
# Returns the result of the execution.
|
# Returns the result of the execution.
|
||||||
# The result will also be stored in `#result`.
|
# The result will also be stored in `#result`.
|
||||||
def run : Result
|
def run : Result
|
||||||
|
Spectator.debug_out("Running example #{example}")
|
||||||
|
@delegate.call(self)
|
||||||
raise NotImplementedError.new("#run")
|
raise NotImplementedError.new("#run")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,21 @@
|
||||||
require "./spec/*"
|
require "./example"
|
||||||
|
require "./example_group"
|
||||||
|
|
||||||
module Spectator
|
module Spectator
|
||||||
class Spec
|
class Spec
|
||||||
|
include Enumerable(Example)
|
||||||
|
|
||||||
|
def initialize(@group : ExampleGroup)
|
||||||
|
end
|
||||||
|
|
||||||
|
def each
|
||||||
|
@group.each do |node|
|
||||||
|
if (example = node.as?(Example))
|
||||||
|
yield example
|
||||||
|
elsif (group = node.as?(ExampleGroup))
|
||||||
|
# TODO
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue