2012-01-07 02:03:08 -05:00
|
|
|
Feature: Setting page settings through frontmatter
|
2012-01-07 21:11:56 -05:00
|
|
|
Scenario: Setting layout, ignoring, and disabling directory indexes through frontmatter (build)
|
2012-01-07 02:03:08 -05:00
|
|
|
Given a successfully built app at "frontmatter-settings-app"
|
|
|
|
Then the following files should exist:
|
2012-05-24 19:14:17 -04:00
|
|
|
| build/proxied.html |
|
|
|
|
And the file "build/alternate_layout.html" should contain "Alternate layout"
|
2012-01-07 02:03:08 -05:00
|
|
|
And the following files should not exist:
|
2012-05-24 19:14:17 -04:00
|
|
|
| build/ignored.html |
|
2012-07-27 04:55:30 -04:00
|
|
|
|
2012-01-07 21:11:56 -05:00
|
|
|
Scenario: Setting layout, ignoring, and disabling directory indexes through frontmatter (preview)
|
|
|
|
Given the Server is running at "frontmatter-settings-app"
|
2012-05-24 19:14:17 -04:00
|
|
|
When I go to "/alternate_layout.html"
|
2012-01-07 21:11:56 -05:00
|
|
|
Then I should not see "File Not Found"
|
|
|
|
And I should see "Alternate layout"
|
|
|
|
When I go to "/ignored.html"
|
|
|
|
Then I should see "File Not Found"
|
|
|
|
When I go to "/ignored/index.html"
|
|
|
|
Then I should see "File Not Found"
|
2012-05-19 17:29:38 -04:00
|
|
|
|
|
|
|
Scenario: Changing frontmatter in preview server
|
|
|
|
Given the Server is running at "frontmatter-settings-app"
|
2012-05-24 19:14:17 -04:00
|
|
|
When I go to "/ignored.html"
|
2012-05-19 17:29:38 -04:00
|
|
|
Then I should see "File Not Found"
|
|
|
|
And the file "source/ignored.html.erb" has the contents
|
|
|
|
"""
|
|
|
|
---
|
|
|
|
ignored: false
|
|
|
|
---
|
|
|
|
|
|
|
|
This file is no longer ignored.
|
|
|
|
"""
|
2012-05-24 19:14:17 -04:00
|
|
|
When I go to "/ignored.html"
|
2012-05-19 17:29:38 -04:00
|
|
|
Then I should see "This file is no longer ignored."
|
2012-07-27 04:55:30 -04:00
|
|
|
|
|
|
|
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"
|