Test gzip extensions option.
This commit is contained in:
parent
13ba9dae62
commit
b819d38358
|
@ -3,12 +3,12 @@ Feature: GZIP assets during build
|
||||||
Scenario: Built assets should be gzipped
|
Scenario: Built assets should be gzipped
|
||||||
Given a successfully built app at "gzip-app"
|
Given a successfully built app at "gzip-app"
|
||||||
Then the following files should exist:
|
Then the following files should exist:
|
||||||
| build/javascripts/test.js.gz |
|
| build/index.html |
|
||||||
| build/stylesheets/test.css.gz |
|
|
||||||
| build/index.html.gz |
|
| build/index.html.gz |
|
||||||
| build/javascripts/test.js |
|
| build/javascripts/test.js |
|
||||||
|
| build/javascripts/test.js.gz |
|
||||||
| build/stylesheets/test.css |
|
| build/stylesheets/test.css |
|
||||||
| build/index.html |
|
| build/stylesheets/test.css.gz |
|
||||||
When I run `file build/javascripts/test.js.gz`
|
When I run `file build/javascripts/test.js.gz`
|
||||||
Then the output should contain "gzip"
|
Then the output should contain "gzip"
|
||||||
|
|
||||||
|
@ -19,3 +19,18 @@ Feature: GZIP assets during build
|
||||||
When I go to "/stylesheets/test.css"
|
When I go to "/stylesheets/test.css"
|
||||||
Then I should see "test_selector"
|
Then I should see "test_selector"
|
||||||
|
|
||||||
|
Scenario: Only specified extensions should be gzipped
|
||||||
|
Given a fixture app "gzip-app"
|
||||||
|
And a file named "config.rb" with:
|
||||||
|
"""
|
||||||
|
activate :gzip, exts: %w(.js .html .htm)
|
||||||
|
"""
|
||||||
|
And a successfully built app at "gzip-app"
|
||||||
|
Then the following files should exist:
|
||||||
|
| build/index.html |
|
||||||
|
| build/index.html.gz |
|
||||||
|
| build/javascripts/test.js |
|
||||||
|
| build/javascripts/test.js.gz |
|
||||||
|
| build/stylesheets/test.css |
|
||||||
|
And the following files should not exist:
|
||||||
|
| build/stylesheets/test.css.gz |
|
||||||
|
|
Loading…
Reference in a new issue