aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2011-10-02 13:57:29 -0200
committerSantiago Pastorino <santiago@wyeworks.com>2011-10-02 13:57:29 -0200
commitc1547fcf6d3920e81a56ed032c49ab75faf562d8 (patch)
tree7c2c558a1ea21800a69084ba32de858b6dd33809 /railties/test
parent9b34e311556fd51f01fda9e5f237969c200125a2 (diff)
downloadrails-c1547fcf6d3920e81a56ed032c49ab75faf562d8.tar.gz
rails-c1547fcf6d3920e81a56ed032c49ab75faf562d8.tar.bz2
rails-c1547fcf6d3920e81a56ed032c49ab75faf562d8.zip
Precompile properly refers files referenced with asset_path test
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/application/assets_test.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/railties/test/application/assets_test.rb b/railties/test/application/assets_test.rb
index 01fe8eeafd..ba59d3faa7 100644
--- a/railties/test/application/assets_test.rb
+++ b/railties/test/application/assets_test.rb
@@ -244,7 +244,7 @@ module ApplicationTests
assert_match(/app.js isn't precompiled/, last_response.body)
end
- test "precompile appends the md5 hash to files referenced with asset_path and run in the provided RAILS_ENV" do
+ test "precompile properly refers files referenced with asset_path and and run in the provided RAILS_ENV" do
app_file "app/assets/stylesheets/application.css.erb", "<%= asset_path('rails.png') %>"
# digest is default in false, we must enable it for test environment
add_to_config "config.assets.digest = true"
@@ -252,6 +252,8 @@ module ApplicationTests
capture(:stdout) do
Dir.chdir(app_path){ `bundle exec rake assets:precompile RAILS_ENV=test` }
end
+ file = Dir["#{app_path}/public/assets/application.css"].first
+ assert_match(/\/assets\/rails\.png/, File.read(file))
file = Dir["#{app_path}/public/assets/application-*.css"].first
assert_match(/\/assets\/rails-([0-z]+)\.png/, File.read(file))
end