2018-08-19 07:15:32 +00:00
|
|
|
require "./spectator/*"
|
|
|
|
|
2018-08-18 21:33:20 +00:00
|
|
|
# TODO: Write documentation for `Spectator`
|
|
|
|
module Spectator
|
|
|
|
VERSION = "0.1.0"
|
|
|
|
|
2018-09-23 01:41:56 +00:00
|
|
|
macro describe(what, &block)
|
2018-09-23 18:02:51 +00:00
|
|
|
module SpectatorExamples
|
|
|
|
include ::Spectator::DSL::StructureDSL
|
|
|
|
|
|
|
|
describe({{what}}) {{block}}
|
|
|
|
end
|
2018-08-19 07:15:32 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
at_exit do
|
2018-09-21 21:23:01 +00:00
|
|
|
begin
|
2018-09-23 19:40:24 +00:00
|
|
|
group = ::Spectator::DSL::Builder.build
|
|
|
|
Runner.new(group).run
|
2018-09-21 21:23:01 +00:00
|
|
|
rescue ex
|
|
|
|
puts
|
|
|
|
puts "Encountered an unexpected error in framework"
|
|
|
|
puts ex.message
|
|
|
|
puts ex.backtrace.join("\n")
|
|
|
|
exit(1)
|
|
|
|
end
|
2018-08-19 07:15:32 +00:00
|
|
|
end
|
2018-08-18 21:33:20 +00:00
|
|
|
end
|