Remove extra assignment operations

This commit is contained in:
Michael Miller 2018-09-27 18:47:54 -06:00
parent 7484b92db9
commit d670d96045
2 changed files with 2 additions and 4 deletions

View file

@ -38,10 +38,9 @@ module Spectator::DSL
def build(parent : ExampleGroup?, sample_values : Internals::SampleValues) : ExampleGroup
ExampleGroup.new(@what, parent, build_hooks).tap do |group|
children = @children.map do |child|
group.children = @children.map do |child|
child.build(group, sample_values).as(ExampleGroup::Child)
end
group.children = children
end
end

View file

@ -47,11 +47,10 @@ module Spectator::DSL
end
_spectator_given_collection Collection%collection, %to_a, %collection
%to_a = Collection%collection.new.%to_a
::Spectator::DSL::Builder.start_given_group(
{{collection.stringify}},
%to_a,
Collection%collection.new.%to_a,
:%group
)