diff options
author | Joshua Peek <josh@joshpeek.com> | 2011-08-08 07:42:49 -0700 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2011-08-08 07:42:49 -0700 |
commit | eabc036496c4f4dbafdcedef7ec8e857fd08641d (patch) | |
tree | 7b1a7a15dc573186e177ca4903761ff2d3d1b106 /actionpack/test | |
parent | 9e5140078fee49f4d1265dd4092f43d5e38128cb (diff) | |
parent | c0bfb5a63c926abcee8df26ed7b7598ef763463a (diff) | |
download | rails-eabc036496c4f4dbafdcedef7ec8e857fd08641d.tar.gz rails-eabc036496c4f4dbafdcedef7ec8e857fd08641d.tar.bz2 rails-eabc036496c4f4dbafdcedef7ec8e857fd08641d.zip |
Merge pull request #2448 from igrigorik/master
Asset pipeline fixes: clear out tmp cache and use environment in digest generation
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/sprockets_helper_test.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/actionpack/test/template/sprockets_helper_test.rb b/actionpack/test/template/sprockets_helper_test.rb index f4b5344d63..dfa635335e 100644 --- a/actionpack/test/template/sprockets_helper_test.rb +++ b/actionpack/test/template/sprockets_helper_test.rb @@ -205,4 +205,17 @@ class SprocketsHelperTest < ActionView::TestCase stubs(:asset_environment).returns(assets) assert_match %r{/assets/style-[0-9a-f]+.css}, asset_path("style", "css") end + + test "alternate hash based on environment" do + assets = Sprockets::Environment.new + assets.version = 'development' + assets.append_path(FIXTURES.join("sprockets/alternate/stylesheets")) + stubs(:asset_environment).returns(assets) + dev_path = asset_path("style", "css") + + assets.version = 'production' + prod_path = asset_path("style", "css") + + assert_not_equal prod_path, dev_path + end end |