From 2ad615952e332603f861e689ad89baa3ef2fe34e Mon Sep 17 00:00:00 2001 From: Jeric Bryle Sy Dy Date: Tue, 20 Jun 2017 17:22:40 +0800 Subject: [PATCH] added test to save_to_source --- features/save-to-source.feature | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 features/save-to-source.feature diff --git a/features/save-to-source.feature b/features/save-to-source.feature new file mode 100644 index 0000000..7f45c3a --- /dev/null +++ b/features/save-to-source.feature @@ -0,0 +1,34 @@ +Feature: Save to source + Scenario: Save to source + Given I have a responsive_image configuration with: + """ + save_to_source: true + 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 + And the file "assets/resized/everybody-loves-jalapeño-pineapple-cornbread-100x50.png" should exist + And the file "assets/resized/progressive-100x50.jpeg" should exist + 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: Do not save to source + Given I have a responsive_image configuration with: + """ + save_to_source: false + 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 + And the file "assets/resized/everybody-loves-jalapeño-pineapple-cornbread-100x50.png" should not exist + And the file "assets/resized/progressive-100x50.jpeg" should not exist + 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 \ No newline at end of file