Merge pull request #552 from cwebbdesign/master

Adding tests for setting layout in frontmatter on pages already defined in config.rb
This commit is contained in:
Thomas Reynolds 2012-07-29 10:12:06 -07:00
commit 0625d96e43
5 changed files with 24 additions and 2 deletions

View file

@ -31,3 +31,13 @@ Feature: Setting page settings through frontmatter
"""
When I go to "/ignored.html"
Then I should see "This file is no longer ignored."
Scenario: Overriding layout through frontmatter
Given the Server is running at "frontmatter-settings-app"
When I go to "/override_layout.html"
Then I should see "Layout in use: Override"
Scenario: Setting layout through frontmatter even if page is mentioned in config
Given the Server is running at "frontmatter-settings-app"
When I go to "/page_mentioned.html"
Then I should see "Layout in use: Override"

View file

@ -1,2 +1,4 @@
# Proxy ignored.html, which should ignore itself through a frontmatter
page 'proxied.html', :proxy => 'ignored.html'
page 'override_layout.html', :layout => :alternate
page 'page_mentioned.html'

View file

@ -0,0 +1,2 @@
<%= yield %>
Override.

View file

@ -0,0 +1,4 @@
---
layout: override
---
Layout in use:

View file

@ -0,0 +1,4 @@
---
layout: override
---
Layout in use: