tests for partials

This commit is contained in:
Thomas Reynolds 2011-11-26 15:32:41 -08:00
parent 2b545f8e35
commit 7c50c9e4d5
13 changed files with 84 additions and 31 deletions

30
features/partials.feature Normal file
View file

@ -0,0 +1,30 @@
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"
Then I should see "Local Partial"

View file

@ -1,15 +0,0 @@
@wip
Feature: Tiny Src
In order automatically scale images for mobile devices
Scenario: Rendering html with the feature disabled
Given "tiny_src" feature is "disabled"
And the Server is running at "test-app"
When I go to "/tiny_src.html"
Then I should see "http://test.com/image.jpg"
Scenario: Rendering html with the feature enabled
Given "tiny_src" feature is "enabled"
And the Server is running at "test-app"
When I go to "/tiny_src.html"
Then I should see "http://i.tinysrc.mobi/http://test.com/image.jpg"