diff --git a/features/nested_layouts.feature b/features/nested_layouts.feature index 146443c5..a591f240 100644 --- a/features/nested_layouts.feature +++ b/features/nested_layouts.feature @@ -6,4 +6,14 @@ Feature: Allow nesting of layouts Then I should see "Template" And I should see "Inner" And I should see "Outer" - And I should see "Master" \ No newline at end of file + And I should see "Master" + + Scenario: YAML Front Matter isn't clobbered with nested layouts + Given the Server is running at "nested-layout-app" + When I go to "/data-one.html" + Then I should see "Page Number One" + When I go to "/data-two.html" + Then I should see "Page Number Two" + When I go to "/data-one.html" + Then I should see "Page Number One" + When I go to "/data-two.html" diff --git a/fixtures/nested-layout-app/source/data-one.html.erb b/fixtures/nested-layout-app/source/data-one.html.erb new file mode 100644 index 00000000..7dfb5840 --- /dev/null +++ b/fixtures/nested-layout-app/source/data-one.html.erb @@ -0,0 +1,5 @@ +--- +title: Page Number One +layout: outer +--- +Page #1 \ No newline at end of file diff --git a/fixtures/nested-layout-app/source/data-two.html.erb b/fixtures/nested-layout-app/source/data-two.html.erb new file mode 100644 index 00000000..387c9da1 --- /dev/null +++ b/fixtures/nested-layout-app/source/data-two.html.erb @@ -0,0 +1,5 @@ +--- +title: Page Number Two +layout: outer +--- +Page #2 \ No newline at end of file diff --git a/fixtures/nested-layout-app/source/layouts/master.erb b/fixtures/nested-layout-app/source/layouts/master.erb index 18dcdbb7..fbda1cc2 100644 --- a/fixtures/nested-layout-app/source/layouts/master.erb +++ b/fixtures/nested-layout-app/source/layouts/master.erb @@ -1,2 +1,3 @@ Master +<%= data.page.title %> <%= yield %> \ No newline at end of file