mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Add test for value of "what"
Minor changes to remove unused parts.
This commit is contained in:
parent
7c21f1e3eb
commit
14ee762ad7
1 changed files with 9 additions and 2 deletions
|
@ -182,13 +182,20 @@ describe Spectator::DSL::NestedExampleGroupBuilder do
|
|||
end
|
||||
|
||||
describe "#build" do
|
||||
it "passes along the what value" do
|
||||
what = "TEST"
|
||||
builder = Spectator::DSL::NestedExampleGroupBuilder.new(what)
|
||||
root = Spectator::DSL::RootExampleGroupBuilder.new.build(Spectator::Internals::SampleValues.empty)
|
||||
group = builder.build(root, Spectator::Internals::SampleValues.empty)
|
||||
group.what.should eq(what)
|
||||
end
|
||||
|
||||
it "passes along the parent" do
|
||||
factory = Spectator::DSL::ExampleFactory.new(SpyExample)
|
||||
builder = Spectator::DSL::NestedExampleGroupBuilder.new("foo")
|
||||
builder.add_child(factory)
|
||||
values = Spectator::Internals::SampleValues.empty.add(:foo, "foo", 12345)
|
||||
root = Spectator::DSL::RootExampleGroupBuilder.new.build(Spectator::Internals::SampleValues.empty)
|
||||
group = builder.build(root, values)
|
||||
group = builder.build(root, Spectator::Internals::SampleValues.empty)
|
||||
group.parent.should be(root)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue