Tidy up tests

This commit is contained in:
Joseph Wynn 2016-12-29 22:19:48 +13:00
parent 85b56541fb
commit 00ded027ad
5 changed files with 4 additions and 15 deletions

View File

@ -12,7 +12,6 @@ Feature: Extra image generation
- assets/everybody-loves-jalapeño-pineapple-cornbread.png
- assets/*.jpeg
"""
And I have a file "index.html" with "Hello, world!"
When I run Jekyll
Then the image "assets/resized/everybody-loves-jalapeño-pineapple-cornbread-100x50.png" should have the dimensions "100x50"
@ -31,7 +30,6 @@ Feature: Extra image generation
extra_images:
- assets/*.png
"""
And I have a file "index.html" with "Hello, world!"
When I run Jekyll
Then the image "sub-dir/my-site-copy/assets/resized/everybody-loves-jalapeño-pineapple-cornbread-100x50.png" should have the dimensions "100x50"
@ -43,7 +41,6 @@ Feature: Extra image generation
sizes:
- width: 100
"""
And I have a file "index.html" with "Hello, world!"
When I run Jekyll
Then the file "assets/resized/everybody-loves-jalapeño-pineapple-cornbread-100x50.png" should not exist

View File

@ -1,7 +1,7 @@
Feature: Responsive image generation
As a Jekyll user
I want to generate responsive images
In order to use them on my pages
I want to resize my images
In order to render them on my pages
Scenario: Resizing images
Given I have a responsive_image configuration with:
@ -10,7 +10,6 @@ Feature: Responsive image generation
sizes:
- width: 100
"""
And I have a file "index.html" with "{% responsive_image path: assets/everybody-loves-jalapeño-pineapple-cornbread.png alt: Foobar %}"
When I run Jekyll
Then the image "assets/resized/everybody-loves-jalapeño-pineapple-cornbread-100x50.png" should have the dimensions "100x50"
@ -24,14 +23,12 @@ Feature: Responsive image generation
sizes:
- width: 100
"""
And I have a file "index.html" with:
"""
{% responsive_image path: assets/everybody-loves-jalapeño-pineapple-cornbread.png %}
{% responsive_image path: assets/subdir/test.png %}
{% responsive_image path: assets/everybody-loves-jalapeño-pineapple-cornbread.png cache: true %}
"""
When I run Jekyll
Then the file "assets/resized/everybody-loves-jalapeño-pineapple-cornbread-100.png" should exist
And the file "_site/assets/resized/everybody-loves-jalapeño-pineapple-cornbread-100.png" should exist
@ -45,7 +42,6 @@ Feature: Responsive image generation
sizes:
- width: 100
"""
And I have a file "index.html" with "{% responsive_image path: assets/progressive.jpeg %}"
When I run Jekyll
Then the image "assets/resized/progressive-100x50.jpeg" should be interlaced

View File

@ -1,5 +1,5 @@
Feature: Image hashes inside responsive image templates
As a Jekyll user
As a Jekyll template developer
I want to have access to image hashes
In order to create custom responsive image templates

View File

@ -8,12 +8,10 @@ Feature: Jekyll responsive_image_block tag
And I have a file "index.html" with:
"""
{% assign path = 'assets/everybody-loves-jalapeño-pineapple-cornbread.png' %}
{% assign alt = 'Lorem ipsum' %}
{% responsive_image_block %}
path: {{ path }}
title: Magic rainbow adventure!
alt: {{ alt }}
alt: Lorem ipsum
{% endresponsive_image_block %}
"""
When I run Jekyll
@ -41,7 +39,6 @@ Feature: Jekyll responsive_image_block tag
"""
{% assign path = 'assets/everybody-loves-jalapeño-pineapple-cornbread.png' %}
{% assign alt = 'Lorem ipsum' %}
{% responsive_image_block %}
path: {{ path }}

View File

@ -1,7 +1,6 @@
Feature: Jekyll responsive_image tag
As a Jekyll template developer
I want to include responsive images in my page
In order to best cater for devices of all sizes
Scenario: Simple image tag
Given I have a responsive_image configuration with "template" set to "_includes/responsive-image.html"