Test gzip extensions option.

This commit is contained in:
Andrew Kvalheim 2014-05-02 10:19:18 -07:00
parent 13ba9dae62
commit b819d38358

View file

@ -3,12 +3,12 @@ Feature: GZIP assets during build
Scenario: Built assets should be gzipped
Given a successfully built app at "gzip-app"
Then the following files should exist:
| build/javascripts/test.js.gz |
| build/stylesheets/test.css.gz |
| build/index.html |
| build/index.html.gz |
| build/javascripts/test.js |
| build/javascripts/test.js.gz |
| build/stylesheets/test.css |
| build/index.html |
| build/stylesheets/test.css.gz |
When I run `file build/javascripts/test.js.gz`
Then the output should contain "gzip"
@ -19,3 +19,18 @@ Feature: GZIP assets during build
When I go to "/stylesheets/test.css"
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 |