mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
87d9cc438f
There seems to be a problem using def in block. This broke helper methods and gives the error: `can't declare def dynamically`.
26 lines
499 B
Crystal
26 lines
499 B
Crystal
require "./spectator/*"
|
|
|
|
# TODO: Write documentation for `Spectator`
|
|
module Spectator
|
|
VERSION = "0.1.0"
|
|
|
|
macro describe(what, &block)
|
|
module SpectatorExamples
|
|
include ::Spectator::DSL::StructureDSL
|
|
|
|
describe({{what}}) {{block}}
|
|
end
|
|
end
|
|
|
|
at_exit do
|
|
begin
|
|
Runner.new(ExampleGroup::ROOT).run
|
|
rescue ex
|
|
puts
|
|
puts "Encountered an unexpected error in framework"
|
|
puts ex.message
|
|
puts ex.backtrace.join("\n")
|
|
exit(1)
|
|
end
|
|
end
|
|
end
|