Scenario for using instance vars to pass data to layouts and templates, and prevent

changes to instance vars being shared between different templates.
This commit is contained in:
Ben Hollis 2011-12-06 23:24:14 -08:00
parent 9b07bf24dd
commit 97dc2c9742
7 changed files with 41 additions and 6 deletions

View file

@ -0,0 +1,20 @@
Feature: Instance Vars
In order to share data with layouts and partials via instance variables
Scenario: Setting an instance var in a template should be visible in its layout
Given the Server is running at "instance-vars-app"
When I go to "/instance-var-set.html"
Then I should see "Var is 100"
Scenario: Setting an instance var in a template should be visible in a partial
Given the Server is running at "instance-vars-app"
When I go to "/instance-var-set.html"
Then I should see "My var is here!"
Scenario: Setting an instance var in one file should not be visible in another
Given the Server is running at "instance-vars-app"
When I go to "/instance-var-set.html"
When I go to "/no-instance-var.html"
Then I should see "No var..."