2011-07-08 01:30:30 +02:00
|
|
|
Feature: YAML Front Matter
|
|
|
|
In order to specific options and data inline
|
|
|
|
|
2012-05-09 22:15:39 +02:00
|
|
|
Scenario: Rendering html (yaml)
|
2011-12-30 00:09:51 +01:00
|
|
|
Given the Server is running at "frontmatter-app"
|
2012-05-09 22:15:39 +02:00
|
|
|
When I go to "/front-matter-auto.html"
|
|
|
|
Then I should see "<h1>This is the title</h1>"
|
|
|
|
Then I should not see "---"
|
2011-07-08 01:30:30 +02:00
|
|
|
When I go to "/front-matter.html"
|
2011-11-28 07:15:56 +01:00
|
|
|
Then I should see "<h1>This is the title</h1>"
|
2011-12-08 06:05:53 +01:00
|
|
|
Then I should not see "---"
|
2011-12-12 01:22:38 +01:00
|
|
|
When I go to "/front-matter-2.php"
|
|
|
|
Then I should see "<h1>This is the title</h1>"
|
|
|
|
Then I should see "<?php"
|
|
|
|
Then I should not see "---"
|
2012-05-09 22:15:39 +02:00
|
|
|
|
|
|
|
Scenario: Rendering html (json)
|
|
|
|
Given the Server is running at "frontmatter-app"
|
|
|
|
When I go to "/json-front-matter-auto.html"
|
|
|
|
Then I should see "<h1>This is the title</h1>"
|
|
|
|
Then I should not see "{"
|
|
|
|
When I go to "/json-front-matter.html"
|
|
|
|
Then I should see "<h1>This is the title</h1>"
|
|
|
|
Then I should not see "{"
|
|
|
|
When I go to "/json-front-matter-2.php"
|
|
|
|
Then I should see "<h1>This is the title</h1>"
|
|
|
|
Then I should see "<?php"
|
|
|
|
Then I should not see "{"
|
2011-12-08 06:05:53 +01:00
|
|
|
|
|
|
|
Scenario: A template changes frontmatter during preview
|
2011-12-30 00:09:51 +01:00
|
|
|
Given the Server is running at "frontmatter-app"
|
2011-12-08 06:05:53 +01:00
|
|
|
And the file "source/front-matter-change.html.erb" has the contents
|
|
|
|
"""
|
|
|
|
---
|
|
|
|
title: Hello World
|
|
|
|
layout: false
|
|
|
|
---
|
|
|
|
<%= data.page.title %>
|
|
|
|
"""
|
|
|
|
When I go to "/front-matter-change.html"
|
|
|
|
Then I should see "Hello World"
|
|
|
|
And the file "source/front-matter-change.html.erb" has the contents
|
|
|
|
"""
|
|
|
|
---
|
|
|
|
title: Hola Mundo
|
|
|
|
layout: false
|
|
|
|
---
|
|
|
|
<%= data.page.title %>
|
|
|
|
"""
|
|
|
|
When I go to "/front-matter-change.html"
|
|
|
|
Then I should see "Hola Mundo"
|