Merge pull request #44 from wildlyinaccurate/remove-redundant-tests

Remove redundant tests
This commit is contained in:
Joseph Wynn 2016-12-29 22:08:24 +13:00 committed by GitHub
commit 85b56541fb
4 changed files with 13 additions and 49 deletions

View File

@ -7,5 +7,6 @@ group :development do
gem 'cucumber', '~> 2.1'
gem 'test-unit', '~> 3.1'
gem 'simplecov', :require => false
gem 'coveralls', :require => false
end

View File

@ -3,33 +3,22 @@ Feature: Extra image generation
I want to resize images that aren't used in posts or pages
In order to use them in my stylesheets
Scenario: Resizing a single image
Scenario: Specifying a single image and glob patterns
Given I have a responsive_image configuration with:
"""
sizes:
- width: 100
extra_images:
- 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"
And the image "assets/resized/progressive-100x50.jpeg" should have the dimensions "100x50"
And the file "_site/assets/resized/everybody-loves-jalapeño-pineapple-cornbread-100x50.png" should exist
Scenario: Using glob patterns
Given I have a responsive_image configuration with:
"""
sizes:
- width: 100
extra_images:
- assets/*.png
"""
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"
And the file "_site/assets/resized/everybody-loves-jalapeño-pineapple-cornbread-100x50.png" should exist
And the file "_site/assets/resized/progressive-100x50.jpeg" should exist
Scenario: Honouring Jekyll 'source' configuration
Given I have copied my site to "sub-dir/my-site-copy"

View File

@ -4,36 +4,6 @@ Feature: Image hashes inside responsive image templates
In order to create custom responsive image templates
Scenario: Using the {% responsive_image %} tag
Given I have a configuration with:
"""
responsive_image:
template: _includes/hash.html
output_path_format: assets/resized/%{dirname}/%{width}/%{basename}
sizes:
- width: 100
"""
And I have a file "index.html" with "{% responsive_image path: assets/subdir/test.png %}"
When I run Jekyll
Then the file "_site/index.html" should contain:
"""
path: assets/subdir/test.png
width: 300
height: 150
basename: test.png
dirname: subdir
filename: test
extension: png
path: assets/resized/subdir/100/test.png
width: 100
height: 50
basename: test.png
dirname: resized/subdir/100
filename: test
extension: png
"""
Scenario: Honouring Jekyll 'source' configuration
Given I have copied my site to "my-site-copy/src"
And I have a configuration with:
"""

View File

@ -1,7 +1,11 @@
if ENV['CI']
require 'coveralls'
Coveralls.wear!
end
require 'simplecov'
require 'coveralls'
formatters = [SimpleCov::Formatter::HTMLFormatter]
formatters << Coveralls::SimpleCov::Formatter if ENV['CI']
SimpleCov.formatters = formatters
SimpleCov.start
require 'test/unit/assertions'
require 'jekyll-responsive-image'