1
0
Fork 0
mirror of https://github.com/middleman/middleman.git synced 2022-11-09 12:20:27 -05:00
middleman--middleman/middleman-core/features/partials.feature

53 lines
1.8 KiB
Gherkin
Raw Normal View History

2011-11-26 18:32:41 -05:00
Feature: Provide Sane Defaults for Partial Behavior
Scenario: Finds shared partials relative to the root
Given the Server is running at "partials-app"
When I go to "/index.html"
Then I should see "Header"
And I should see "Footer"
Scenario: Finds shared partials relative to the root (sub)
Given the Server is running at "partials-app"
When I go to "/sub/index.html"
Then I should see "Header"
And I should see "Footer"
2011-11-26 18:32:41 -05:00
Scenario: Prefers partials of the same engine type
Given the Server is running at "partials-app"
When I go to "/index.html"
Then I should see "ERb Main"
Scenario: Prefers partials of the same engine type
Given the Server is running at "partials-app"
When I go to "/second.html"
Then I should see "Str Main"
2011-11-26 18:32:41 -05:00
And I should see "Header"
And I should see "Footer"
Scenario: Finds partial relative to template
Given the Server is running at "partials-app"
When I go to "/sub/index.html"
2011-11-28 00:56:21 -05:00
Then I should see "Local Partial"
Scenario: Partials can be passed locals
Given the Server is running at "partials-app"
When I go to "/locals.html"
Then I should see "Local var is bar"
2011-12-01 01:39:50 -05:00
Scenario: Partial and Layout use different engines
Given the Server is running at "different-engine-partial"
When I go to "/index.html"
2011-12-02 01:43:41 -05:00
Then I should see "ERb Header"
And I should see "Str Footer"
Scenario: Works with non-template content (svg)
Given the Server is running at "partials-app"
When I go to "/svg.html"
Then I should see "<svg"
When I go to "/static_underscore.html"
Then I should see "<p>Hello World</p>"
When I go to "/code_snippet.html"
Then I should see "File Not Found"
When I go to "/_code_snippet.html"
Then I should see "File Not Found"