Merge pull request #5060 from stomar/stringify-overrides

Merge pull request 5060
This commit is contained in:
jekyllbot
2016-07-15 17:26:14 -07:00
committed by GitHub
2 changed files with 13 additions and 0 deletions

View File

@@ -334,6 +334,18 @@ class TestConfiguration < JekyllUnitTest
Jekyll.configuration(test_config.merge({ "config" => @paths[:other] }))
end
should "load different config if specified with symbol key" do
allow(SafeYAML).to receive(:load_file).with(@paths[:default]).and_return({})
allow(SafeYAML)
.to receive(:load_file)
.with(@paths[:other])
.and_return({ "baseurl" => "http://example.com" })
allow($stdout).to receive(:puts).with("Configuration file: #{@paths[:other]}")
assert_equal \
site_configuration({ "baseurl" => "http://example.com" }),
Jekyll.configuration(test_config.merge({ :config => @paths[:other] }))
end
should "load default config if path passed is empty" do
allow(SafeYAML).to receive(:load_file).with(@paths[:default]).and_return({})
allow($stdout).to receive(:puts).with("Configuration file: #{@paths[:default]}")