Test showing wrap_layout is still broken when used with haml

This commit is contained in:
Ben Hollis 2012-03-25 01:02:46 -07:00 committed by Thomas Reynolds
parent d8d4769702
commit 9b5d1f17d0
6 changed files with 27 additions and 0 deletions

View file

@ -0,0 +1,7 @@
---
title: "New Article Title"
date: 2011-01-01
layout: inner_haml
---
The Article Content

View file

@ -0,0 +1,3 @@
- wrap_layout :outer_haml do
Inner
= yield

View file

@ -0,0 +1,3 @@
Master
= data.page.title
= yield

View file

@ -0,0 +1,3 @@
- wrap_layout :master_haml do
Outer
= yield

View file

@ -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

View file

@ -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