From 2e68e09200744ae3312675f50f39dff33dc603de Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Thu, 26 Apr 2012 16:20:03 -0700 Subject: [PATCH] Fixture-less ignored_already_minified --- .../features/ignore_already_minified.feature | 43 +++++++++++++++++-- .../fixtures/already-minified-app/config.rb | 2 - .../source/javascripts/test.min.js | 10 ----- .../source/stylesheets/test.min.css | 10 ----- 4 files changed, 39 insertions(+), 26 deletions(-) delete mode 100644 middleman-more/fixtures/already-minified-app/config.rb delete mode 100644 middleman-more/fixtures/already-minified-app/source/javascripts/test.min.js delete mode 100644 middleman-more/fixtures/already-minified-app/source/stylesheets/test.min.css diff --git a/middleman-more/features/ignore_already_minified.feature b/middleman-more/features/ignore_already_minified.feature index 98e38620..d24d8109 100644 --- a/middleman-more/features/ignore_already_minified.feature +++ b/middleman-more/features/ignore_already_minified.feature @@ -1,12 +1,47 @@ Feature: CSS and Javascripts which are minify shouldn't be re-minified - Scenario: CSS file - + Scenario: JS files containing ".min" should not be re-compressed - And the Server is running at "already-minified-app" + Given an empty app + And a file named "config.rb" with: + """ + activate :minify_javascript + """ + And a file named "source/javascripts/test.min.js" with: + """ + var numbers = [ 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10 ]; + """ + And the Server is running at "empty_app" When I go to "/javascripts/test.min.js" Then I should see "10" lines Scenario: CSS files containing ".min" should not be re-compressed - And the Server is running at "already-minified-app" + Given an empty app + And a file named "config.rb" with: + """ + activate :minify_css + """ + And a file named "source/stylesheets/test.min.css" with: + """ + body { one: 1; + two: 2; + three: 3; + four: 4; + five: 5; + six: 6; + seven: 7; + eight: 8; + nine: 9; + ten: 10; } + """ + And the Server is running at "empty_app" When I go to "/stylesheets/test.min.css" Then I should see "10" lines \ No newline at end of file diff --git a/middleman-more/fixtures/already-minified-app/config.rb b/middleman-more/fixtures/already-minified-app/config.rb deleted file mode 100644 index 4aafdc75..00000000 --- a/middleman-more/fixtures/already-minified-app/config.rb +++ /dev/null @@ -1,2 +0,0 @@ -activate :minify_javascript -activate :minify_css \ No newline at end of file diff --git a/middleman-more/fixtures/already-minified-app/source/javascripts/test.min.js b/middleman-more/fixtures/already-minified-app/source/javascripts/test.min.js deleted file mode 100644 index a656a87d..00000000 --- a/middleman-more/fixtures/already-minified-app/source/javascripts/test.min.js +++ /dev/null @@ -1,10 +0,0 @@ -var numbers = [ 1, -2, -3, -4, -5, -6, -7, -8, -9, -10 ]; \ No newline at end of file diff --git a/middleman-more/fixtures/already-minified-app/source/stylesheets/test.min.css b/middleman-more/fixtures/already-minified-app/source/stylesheets/test.min.css deleted file mode 100644 index fdfb866d..00000000 --- a/middleman-more/fixtures/already-minified-app/source/stylesheets/test.min.css +++ /dev/null @@ -1,10 +0,0 @@ -body { one: 1; - two: 2; - three: 3; - four: 4; - five: 5; - six: 6; - seven: 7; - eight: 8; - nine: 9; - ten: 10; } \ No newline at end of file