shard-spectator/src/spectator.cr
Michael Miller 87d9cc438f Move code for root back to Spectator#describe
There seems to be a problem using def in block.
This broke helper methods and gives the error: `can't declare def 
dynamically`.
2018-09-23 12:02:51 -06:00

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