Permalink
Browse files

Merge pull request #14852 from matthewd/fix_build_for_assets

Fix railties asset tests: precompile the image we're referencing
  • Loading branch information...
2 parents 32cdc03 + 4f31b77 commit 26ba863fd90531b9e781d1b118eab548edb66fd6 @rafaelfranca rafaelfranca committed Apr 23, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 railties/test/application/assets_test.rb
@@ -450,7 +450,7 @@ class ::PostsController < ActionController::Base; end
test "asset urls should be protocol-relative if no request is in scope" do
app_file "app/assets/images/rails.png", "notreallyapng"
app_file "app/assets/javascripts/image_loader.js.erb", "var src='<%= image_path('rails.png') %>';"
- add_to_config "config.assets.precompile = %w{image_loader.js}"
+ add_to_config "config.assets.precompile = %w{rails.png image_loader.js}"
add_to_config "config.asset_host = 'example.com'"
precompile!
@@ -462,7 +462,7 @@ class ::PostsController < ActionController::Base; end
app_file "app/assets/images/rails.png", "notreallyapng"
app_file "app/assets/javascripts/app.js.erb", "var src='<%= image_path('rails.png') %>';"
- add_to_config "config.assets.precompile = %w{app.js}"
+ add_to_config "config.assets.precompile = %w{rails.png app.js}"
precompile!
assert_match "src='/sub/uri/assets/rails.png'", File.read(Dir["#{app_path}/public/assets/app-*.js"].first)

0 comments on commit 26ba863

Please sign in to comment.