Change NestedExampleGroup to ExampleGroup

This commit is contained in:
Michael Miller 2020-09-12 16:01:52 -06:00
parent 225c358cb8
commit 3133717323
No known key found for this signature in database
GPG key ID: FB9F12F7C646A4AD

View file

@ -11,7 +11,7 @@ module Spectator::Formatting
private INDENT = " " private INDENT = " "
@previous_hierarchy = [] of NestedExampleGroup @previous_hierarchy = [] of ExampleGroup
# Creates the formatter. # Creates the formatter.
# By default, output is sent to STDOUT. # By default, output is sent to STDOUT.
@ -34,9 +34,9 @@ module Spectator::Formatting
# Produces a list of groups making up the hierarchy for an example. # Produces a list of groups making up the hierarchy for an example.
private def group_hierarchy(example) private def group_hierarchy(example)
hierarchy = [] of NestedExampleGroup hierarchy = [] of ExampleGroup
group = example.group group = example.group
while group.is_a?(NestedExampleGroup) while group.is_a?(ExampleGroup)
hierarchy << group hierarchy << group
group = group.parent group = group.parent
end end