2018-11-07 13:00:44 -05:00
|
|
|
Feature: CSS and JavaScripts which are minify shouldn't be re-minified
|
2012-04-26 19:20:03 -04:00
|
|
|
|
2011-12-28 18:29:19 -05:00
|
|
|
Scenario: JS files containing ".min" should not be re-compressed
|
2012-04-26 19:20:03 -04:00
|
|
|
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"
|
2011-12-28 18:29:19 -05:00
|
|
|
When I go to "/javascripts/test.min.js"
|
|
|
|
Then I should see "10" lines
|
|
|
|
|
|
|
|
Scenario: CSS files containing ".min" should not be re-compressed
|
2012-04-26 19:20:03 -04:00
|
|
|
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"
|
2011-12-28 18:29:19 -05:00
|
|
|
When I go to "/stylesheets/test.min.css"
|
|
|
|
Then I should see "10" lines
|