Add global variable test for block tag

This commit is contained in:
Joseph Wynn 2015-11-05 09:18:53 +00:00
parent 04eb007f18
commit 4a1e36f2d2
1 changed files with 16 additions and 0 deletions

View File

@ -19,6 +19,22 @@ Feature: Jekyll responsive_image_block tag
When I run Jekyll When I run Jekyll
Then I should see "<img alt=\"Lorem ipsum\" src=\"/assets/test.png\" title=\"Magic rainbow adventure!\"" in "_site/index.html" Then I should see "<img alt=\"Lorem ipsum\" src=\"/assets/test.png\" title=\"Magic rainbow adventure!\"" in "_site/index.html"
Scenario: Global variables available in templates
Given I have a file "index.html" with:
"""
{% responsive_image_block %}
path: assets/test.png
{% endresponsive_image_block %}
"""
And I have a configuration with:
"""
baseurl: https://wildlyinaccurate.com
responsive_image:
template: _includes/base-url.html
"""
When I run Jekyll
Then I should see "<img src=\"https://wildlyinaccurate.com/assets/test.png\">" in "_site/index.html"
Scenario: More complex logic in the block tag Scenario: More complex logic in the block tag
Given I have a responsive_image configuration with "template" set to "_includes/responsive-image.html" Given I have a responsive_image configuration with "template" set to "_includes/responsive-image.html"
And I have a file "index.html" with: And I have a file "index.html" with: