mirror of
https://github.com/middleman/middleman.git
synced 2022-11-09 12:20:27 -05:00
Confirm nested frontmatter doesn't work
This commit is contained in:
parent
598d72480f
commit
c5aabbbe4f
10 changed files with 70 additions and 30 deletions
|
@ -5,37 +5,37 @@ Feature: Allow nesting of layouts
|
|||
When I go to "/index.html"
|
||||
Then I should see:
|
||||
"""
|
||||
Master
|
||||
Master Erb
|
||||
<h1>Index Title</h1>
|
||||
Outer
|
||||
Inner
|
||||
I am Outer
|
||||
I am Inner
|
||||
Template
|
||||
|
||||
"""
|
||||
When I go to "/another.html"
|
||||
Then I should see:
|
||||
"""
|
||||
Master
|
||||
Master Erb
|
||||
<h1>New Article Title</h1>
|
||||
Outer
|
||||
Inner
|
||||
I am Outer
|
||||
I am Inner
|
||||
<p>The Article Content</p>
|
||||
"""
|
||||
|
||||
Scenario: A page uses an inner layout when uses an outer layout (slim)
|
||||
Given the Server is running at "nested-layout-app"
|
||||
When I go to "/slim-test.html"
|
||||
Then I should see "<h1>Master</h1><p>New Article Title</p><div><h2>Outer</h2><h3>Inner</h3><p>The Article Content</p>"
|
||||
Then I should see "<h1>Master Slim</h1><p>New Article Title</p><div><h2>I am Outer</h2><h3>I am Inner</h3><p>The Article Content</p>"
|
||||
|
||||
Scenario: A page uses an inner layout when uses an outer layout (haml)
|
||||
Given the Server is running at "nested-layout-app"
|
||||
When I go to "/haml-test.html"
|
||||
Then I should see:
|
||||
"""
|
||||
Master
|
||||
Master Haml
|
||||
<h1>New Article Title</h1>
|
||||
Outer
|
||||
Inner
|
||||
I am Outer
|
||||
I am Inner
|
||||
<p>The Article Content</p>
|
||||
"""
|
||||
|
||||
|
@ -43,13 +43,16 @@ Feature: Allow nesting of layouts
|
|||
Given the Server is running at "nested-layout-app"
|
||||
When I go to "/data-one.html"
|
||||
Then I should see "Page Number One"
|
||||
And I should see "Inner"
|
||||
And I should see "Page #1"
|
||||
And I should see "I am Inner"
|
||||
And I should see "I am Outer"
|
||||
And I should see "Master Erb"
|
||||
When I go to "/data-two.html"
|
||||
Then I should see "Page Number Two"
|
||||
And I should not see "Inner"
|
||||
And I should not see "I am Inner"
|
||||
When I go to "/data-one.html"
|
||||
Then I should see "Page Number One"
|
||||
And I should see "Inner"
|
||||
And I should see "I am Inner"
|
||||
When I go to "/data-two.html"
|
||||
Then I should see "Page Number Two"
|
||||
And I should not see "Inner"
|
||||
And I should not see "I am Inner"
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
---
|
||||
inner: true
|
||||
---
|
||||
<% wrap_layout :outer do %>
|
||||
Inner
|
||||
I am Inner
|
||||
<%= yield %>
|
||||
<% end %>
|
|
@ -1,3 +1,7 @@
|
|||
---
|
||||
inner_haml: true
|
||||
---
|
||||
|
||||
= wrap_layout :outer_haml do
|
||||
Inner
|
||||
I am Inner
|
||||
= yield
|
|
@ -1,3 +1,7 @@
|
|||
---
|
||||
inner_slim: true
|
||||
---
|
||||
|
||||
= wrap_layout :outer_slim do
|
||||
h3 Inner
|
||||
h3 I am Inner
|
||||
== yield
|
|
@ -1,3 +1,9 @@
|
|||
Master
|
||||
---
|
||||
master: true
|
||||
---
|
||||
|
||||
Master Erb
|
||||
<h1><%= current_page.data.title %></h1>
|
||||
<%= yield %>
|
||||
|
||||
Using Inner: <%= current_page.data.inner ? 'true' : 'false' %>
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
Master
|
||||
---
|
||||
master_haml: true
|
||||
---
|
||||
|
||||
Master Haml
|
||||
%h1= current_page.data.title
|
||||
= yield
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
h1 Master
|
||||
---
|
||||
master_slim: true
|
||||
---
|
||||
|
||||
h1 Master Slim
|
||||
p== current_page.data.title
|
||||
div== yield
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
---
|
||||
outer: true
|
||||
---
|
||||
|
||||
<% wrap_layout :master do %>
|
||||
Outer
|
||||
I am Outer
|
||||
<%= yield %>
|
||||
<% end %>
|
|
@ -1,3 +1,7 @@
|
|||
---
|
||||
outer_haml: true
|
||||
---
|
||||
|
||||
= wrap_layout :master_haml do
|
||||
Outer
|
||||
I am Outer
|
||||
= yield
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
---
|
||||
outer_slim: true
|
||||
---
|
||||
|
||||
= wrap_layout :master_slim do
|
||||
h2 Outer
|
||||
h2 I am Outer
|
||||
== yield
|
||||
|
|
Loading…
Reference in a new issue