From 12a8be0b982936c7e3ccd346b58b453ee4d12197 Mon Sep 17 00:00:00 2001 From: Rodrigo Dumont Date: Mon, 12 May 2014 13:47:41 -0300 Subject: [PATCH] Add scenario for ensuring data folder over file precedence --- features/data.feature | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/features/data.feature b/features/data.feature index 4584f347..4f0e32ed 100644 --- a/features/data.feature +++ b/features/data.feature @@ -72,6 +72,23 @@ Feature: Data Then the "_site/index.html" file should exist And I should see "Dairy Products" in "_site/index.html" + Scenario: folders should have precedence over files with the same name + Given I have a _data directory + And I have a _data/categories directory + And I have a "_data/categories/dairy.yaml" file with content: + """ + name: Dairy Products + """ + And I have a "_data/categories.yaml" file with content: + """ + dairy: + name: Should not display this + """ + And I have an "index.html" page that contains "{{ site.data.categories.dairy.name }}" + When I run jekyll build + Then the "_site/index.html" file should exist + And I should see "Dairy Products" in "_site/index.html" + Scenario: should be backward compatible with site.data in _config.yml Given I have a "_config.yml" file with content: """