spec/features/include_spec.rb in config_hound-1.0.0 vs spec/features/include_spec.rb in config_hound-1.1.0
- old
+ new
@@ -162,8 +162,36 @@
)
end
end
+ context "with multiple includes" do
+
+ given_resource "config.yml", %{
+ _include:
+ - fileA.yml
+ - fileB.yml
+ }
+
+ given_resource "fileA.yml", %{
+ source: A
+ fromA: true
+ }
+
+ given_resource "fileB.yml", %{
+ source: B
+ fromB: true
+ }
+
+ it "loads both files" do
+ expect(config).to have_key("fromA")
+ expect(config).to have_key("fromB")
+ end
+
+ it "favours earliest included file" do
+ expect(config["source"]).to eq("A")
+ end
+
+ end
end