Have the DSL builder produce a test suite

This commit is contained in:
Michael Miller 2018-12-12 15:27:40 -07:00
parent 6c5da5a703
commit 38ec35dd29
2 changed files with 6 additions and 6 deletions

View file

@ -91,10 +91,11 @@ module Spectator::DSL
current_group.add_around_each_hook(block)
end
# Builds the entire spec and returns it as a group.
# Builds the entire spec and returns it as a test suite.
# This should be called only once after the entire spec has been defined.
protected def build : ExampleGroup
root_group.build(Internals::SampleValues.empty)
protected def build : TestSuite
group = root_group.build(Internals::SampleValues.empty)
TestSuite.new(group)
end
end
end