2009-11-22 15:37:11 -08:00
|
|
|
Feature: Generate mtime-based query string for busting browser caches
|
|
|
|
In order to display the most recent content for IE & CDNs and appease YSlow
|
|
|
|
|
|
|
|
Scenario: Rendering css with the feature disabled
|
|
|
|
Given "cache_buster" feature is "disabled"
|
2011-12-29 19:04:39 -08:00
|
|
|
And the Server is running at "cache-buster-app"
|
2009-11-22 15:37:11 -08:00
|
|
|
When I go to "/stylesheets/relative_assets.css"
|
2014-04-07 12:43:16 -07:00
|
|
|
Then I should see 'blank.gif"'
|
2009-11-22 15:37:11 -08:00
|
|
|
|
|
|
|
Scenario: Rendering html with the feature disabled
|
|
|
|
Given "cache_buster" feature is "disabled"
|
2011-12-29 19:04:39 -08:00
|
|
|
And the Server is running at "cache-buster-app"
|
2009-11-22 15:37:11 -08:00
|
|
|
When I go to "/cache-buster.html"
|
2012-04-01 18:25:57 -07:00
|
|
|
Then I should see 'site.css"'
|
2010-09-04 20:26:48 -07:00
|
|
|
|
|
|
|
Scenario: Rendering css with the feature enabled
|
|
|
|
Given "cache_buster" feature is "enabled"
|
2011-12-29 19:04:39 -08:00
|
|
|
And the Server is running at "cache-buster-app"
|
2010-09-04 20:26:48 -07:00
|
|
|
When I go to "/stylesheets/relative_assets.css"
|
2012-04-01 18:25:57 -07:00
|
|
|
Then I should see "blank.gif?"
|
2010-09-04 20:26:48 -07:00
|
|
|
|
|
|
|
Scenario: Rendering html with the feature enabled
|
|
|
|
Given "cache_buster" feature is "enabled"
|
2011-12-29 19:04:39 -08:00
|
|
|
And the Server is running at "cache-buster-app"
|
2010-09-04 20:26:48 -07:00
|
|
|
When I go to "/cache-buster.html"
|
2012-04-01 18:25:57 -07:00
|
|
|
Then I should see "site.css?"
|
|
|
|
Then I should see "blank.gif?"
|
2013-02-09 15:53:21 -08:00
|
|
|
|
|
|
|
Scenario: Rendering css with the feature and relative_assets enabled
|
|
|
|
Given "relative_assets" feature is "enabled"
|
|
|
|
Given "cache_buster" feature is "enabled"
|
|
|
|
And the Server is running at "cache-buster-app"
|
|
|
|
When I go to "/stylesheets/relative_assets.css"
|
|
|
|
Then I should see "blank.gif?"
|
|
|
|
|
|
|
|
Scenario: Rendering html with the feature and relative_assets enabled
|
|
|
|
Given "relative_assets" feature is "enabled"
|
|
|
|
Given "cache_buster" feature is "enabled"
|
|
|
|
And the Server is running at "cache-buster-app"
|
|
|
|
When I go to "/cache-buster.html"
|
|
|
|
Then I should see "site.css?"
|
2016-01-09 08:06:47 -07:00
|
|
|
Then I should see "blank.gif?"
|
|
|
|
|
|
|
|
Scenario: URLs are not rewritten for rewrite ignored paths
|
|
|
|
Given a fixture app "cache-buster-app"
|
|
|
|
And a file named "config.rb" with:
|
|
|
|
"""
|
|
|
|
activate :cache_buster, rewrite_ignore: [
|
|
|
|
'/cache-buster.html',
|
|
|
|
]
|
|
|
|
"""
|
|
|
|
And the Server is running at "cache-buster-app"
|
|
|
|
When I go to "/cache-buster.html"
|
|
|
|
Then I should see 'site.css"'
|
|
|
|
Then I should see 'empty-with-include.js"'
|
|
|
|
Then I should see 'blank.gif"'
|