Merge pull request #39 from wildlyinaccurate/clean-up-tests

Remove some redundant test code
This commit is contained in:
Joseph Wynn 2016-10-18 22:13:44 +01:00 committed by GitHub
commit 8d962b2631
2 changed files with 1 additions and 16 deletions

View File

@ -11,7 +11,6 @@ Feature: Image hashes inside responsive image templates
output_path_format: assets/resized/%{dirname}/%{width}/%{basename}
sizes:
- width: 100
- width: 120
"""
And I have a file "index.html" with "{% responsive_image path: assets/subdir/test.png %}"
When I run Jekyll
@ -32,14 +31,6 @@ Feature: Image hashes inside responsive image templates
dirname: resized/subdir/100
filename: test
extension: png
path: assets/resized/subdir/120/test.png
width: 120
height: 60
basename: test.png
dirname: resized/subdir/120
filename: test
extension: png
"""
Scenario: Honouring Jekyll 'source' configuration

View File

@ -48,9 +48,6 @@ Feature: Jekyll responsive_image tag
Then I should see "<img alt=\"\" src=\"/assets/subdir/test.png\"" in "_site/index.html"
And I should see "/assets/resized/test-100x50.png 100w,/assets/resized/test-200x100.png 200w,/assets/subdir/test.png 300w" in "_site/index.html"
And the file "assets/resized/test-100x50.png" should exist
And the file "assets/resized/test-200x100.png" should exist
Scenario: Overriding the template
Given I have a responsive_image configuration with:
"""
@ -58,11 +55,10 @@ Feature: Jekyll responsive_image tag
sizes:
- width: 50
- width: 100
- width: 150
"""
And I have a file "index.html" with "{% responsive_image path: assets/everybody-loves-jalapeño-pineapple-cornbread.png template: _includes/custom-template.html %}"
When I run Jekyll
Then I should see "[50, 100, 150]" in "_site/index.html"
Then I should see "[50, 100]" in "_site/index.html"
Scenario: Overriding the generated filenames
Given I have a responsive_image configuration with:
@ -75,5 +71,3 @@ Feature: Jekyll responsive_image tag
And I have a file "index.html" with "{% responsive_image path: assets/everybody-loves-jalapeño-pineapple-cornbread.png %}"
When I run Jekyll
Then I should see "/assets/everybody-loves-jalapeño-pineapple-cornbread.png-resized/100/everybody-loves-jalapeño-pineapple-cornbread-50.png 100w" in "_site/index.html"
And the file "assets/everybody-loves-jalapeño-pineapple-cornbread.png-resized/100/everybody-loves-jalapeño-pineapple-cornbread-50.png" should exist
And the file "_site/assets/everybody-loves-jalapeño-pineapple-cornbread.png-resized/100/everybody-loves-jalapeño-pineapple-cornbread-50.png" should exist