Add Rscons::VarSet#values_at - close #45

This commit is contained in:
josh committed 2017-08-03 15:54:24 -04:00
1 parent 89562c584a
commit 099d26f33c
2 files changed
+22

No files matched your search

+9
View File
@@ -199,5 +199,14 @@ module Rscons
end
end
describe "#values_at" do
it "returns an array of the values associated with the given keys" do
v = VarSet.new({"fuz" => "a string", "foo" => 42, "bar" => :baz,
"qax" => [3, 6], "qux" => {a: :b}})
expect(v.values_at).to eq []
expect(v.values_at(*%w[fuz qux qax])).to eq ["a string", {a: :b}, [3, 6]]
end
end
end
end