Test showing wrap_layout is still broken when used with haml
This commit is contained in:
parent
d8d4769702
commit
9b5d1f17d0
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: "New Article Title"
|
||||
date: 2011-01-01
|
||||
layout: inner_haml
|
||||
---
|
||||
|
||||
The Article Content
|
|
@ -0,0 +1,3 @@
|
|||
- wrap_layout :outer_haml do
|
||||
Inner
|
||||
= yield
|
|
@ -0,0 +1,3 @@
|
|||
Master
|
||||
= data.page.title
|
||||
= yield
|
|
@ -0,0 +1,3 @@
|
|||
- wrap_layout :master_haml do
|
||||
Outer
|
||||
= yield
|
|
@ -336,6 +336,11 @@ module Middleman
|
|||
@_out_buf = _buf_was
|
||||
end
|
||||
layout_path = locate_layout(layout_name, current_engine)
|
||||
|
||||
if !@_out_buf
|
||||
raise "wrap_layout is currently broken for this templating system"
|
||||
end
|
||||
|
||||
@_out_buf.concat render_individual_file(layout_path, @current_locs || {}, @current_opts || {}, self) { content }
|
||||
end
|
||||
|
||||
|
|
|
@ -13,6 +13,12 @@ Feature: Allow nesting of layouts
|
|||
And I should see "Inner"
|
||||
And I should see "Outer"
|
||||
And I should see "Master"
|
||||
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"
|
||||
|
||||
|
||||
Scenario: YAML Front Matter isn't clobbered with nested layouts
|
||||
|
|
Loading…
Reference in a new issue