2011-11-27 00:32:41 +01: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"
|
|
|
|
|
|
|
|
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 "Haml Main"
|
|
|
|
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 06:56:21 +01: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"
|
2011-12-01 07:38:34 +01:00
|
|
|
Then I should see "Local var is bar"
|
|
|
|
|
|
|
|
Scenario: Partial and Layout of different engine
|
|
|
|
Given the Server is running at "different-engine-partial"
|
|
|
|
When I go to "/index.html"
|
|
|
|
Then I should see "Slim Footer"
|
|
|
|
|