mirror of
https://github.com/middleman/middleman.git
synced 2022-11-09 12:20:27 -05:00
Update nested_layout tests to show that Haml still doesn't work right. Also updated Slim and ERb tests to verify ordering of output.
This commit is contained in:
parent
f287e0a2bc
commit
efa846341d
9 changed files with 37 additions and 49 deletions
|
@ -1,7 +0,0 @@
|
|||
---
|
||||
title: "New Article Title"
|
||||
date: 2011-01-01
|
||||
layout: inner
|
||||
---
|
||||
|
||||
The Article Content
|
|
@ -1,7 +0,0 @@
|
|||
---
|
||||
title: "New Article Title"
|
||||
date: 2011-01-01
|
||||
layout: inner_haml
|
||||
---
|
||||
|
||||
The Article Content
|
|
@ -1,3 +0,0 @@
|
|||
- wrap_layout :outer_haml do
|
||||
Inner
|
||||
= yield
|
|
@ -1,3 +0,0 @@
|
|||
Master
|
||||
= data.page.title
|
||||
= yield
|
|
@ -1,3 +0,0 @@
|
|||
- wrap_layout :master_haml do
|
||||
Outer
|
||||
= yield
|
|
@ -3,34 +3,45 @@ Feature: Allow nesting of layouts
|
|||
Scenario: A page uses an inner layout when uses an outer layout
|
||||
Given the Server is running at "nested-layout-app"
|
||||
When I go to "/index.html"
|
||||
Then I should see "Template"
|
||||
And I should see "Inner"
|
||||
And I should see "Outer"
|
||||
And I should see "Master"
|
||||
Then I should see:
|
||||
"""
|
||||
Master
|
||||
Outer
|
||||
Inner
|
||||
Template
|
||||
|
||||
"""
|
||||
When I go to "/another.html"
|
||||
And I should see "New Article Title"
|
||||
And I should see "The Article Content"
|
||||
And I should see "Inner"
|
||||
And I should see "Outer"
|
||||
And I should see "Master"
|
||||
Then I should see:
|
||||
"""
|
||||
Master
|
||||
New Article Title
|
||||
Outer
|
||||
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"
|
||||
And I should see "New Article Title"
|
||||
And I should see "The Article Content"
|
||||
And I should see "Inner"
|
||||
And I should see "Outer"
|
||||
And I should see "Master"
|
||||
Then I should see:
|
||||
"""
|
||||
<h1>Master</h1><p>New Article Title</p><div><h2>Outer</h2><h3>Inner</h3><p>The Article Content</p>
|
||||
</div>
|
||||
"""
|
||||
|
||||
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"
|
||||
And I should see "New Article Title"
|
||||
And I should see "The Article Content"
|
||||
And I should see "Inner"
|
||||
And I should see "Outer"
|
||||
And I should see "Master"
|
||||
Then I should see:
|
||||
"""
|
||||
Master
|
||||
New Article Title
|
||||
Outer
|
||||
Inner
|
||||
|
||||
<p>The Article Content</p>
|
||||
"""
|
||||
|
||||
Scenario: YAML Front Matter isn't clobbered with nested layouts
|
||||
Given the Server is running at "nested-layout-app"
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
- wrap_layout :outer_slim do
|
||||
Inner
|
||||
= yield
|
||||
h3 Inner
|
||||
== yield
|
|
@ -1,3 +1,3 @@
|
|||
Master
|
||||
= data.page.title
|
||||
= yield
|
||||
h1 Master
|
||||
p== data.page.title
|
||||
div== yield
|
|
@ -1,3 +1,3 @@
|
|||
- wrap_layout :master_slim do
|
||||
Outer
|
||||
= yield
|
||||
h2 Outer
|
||||
== yield
|
||||
|
|
Loading…
Reference in a new issue