Finally implement pending test

This commit is contained in:
Michael Miller 2018-12-13 14:53:04 -07:00
parent 77efdd84be
commit 3573845dc2

View file

@ -237,7 +237,7 @@ describe Spectator::DSL::GivenExampleGroupBuilder do
all_children.map(&.as(SpyExample)).all? { |child| child.sample_values.get_wrapper(symbol) }.should be_true all_children.map(&.as(SpyExample)).all? { |child| child.sample_values.get_wrapper(symbol) }.should be_true
end end
pending "it passes along the given value name" do it "passes along the given value name" do
symbol = :foo symbol = :foo
name = "value" name = "value"
factory = Spectator::DSL::ExampleFactory.new(SpyExample) factory = Spectator::DSL::ExampleFactory.new(SpyExample)
@ -246,8 +246,10 @@ describe Spectator::DSL::GivenExampleGroupBuilder do
root = Spectator::DSL::RootExampleGroupBuilder.new.build(Spectator::Internals::SampleValues.empty) root = Spectator::DSL::RootExampleGroupBuilder.new.build(Spectator::Internals::SampleValues.empty)
group = builder.build(root, Spectator::Internals::SampleValues.empty) group = builder.build(root, Spectator::Internals::SampleValues.empty)
all_children = group.map { |child| child.as(Spectator::ExampleGroup).to_a }.flatten all_children = group.map { |child| child.as(Spectator::ExampleGroup).to_a }.flatten
# TODO: Ensure that all children have sample values with the name given to the builder. all_children.each do |child|
# There is currently no method to retrieve the value's name. entries = child.as(SpyExample).sample_values.map(&.name)
entries.should contain(name)
end
end end
it "creates the correct number of sub-groups" do it "creates the correct number of sub-groups" do