Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Explictly set the assets digest option to false

  • Loading branch information...
commit 9d07aceb504c0730d5777624d1c3ff77addc61a0 1 parent 54f5574
@rafaelfranca rafaelfranca authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 railties/test/application/assets_test.rb
View
7 railties/test/application/assets_test.rb
@@ -243,6 +243,7 @@ def show_detailed_exceptions?() true end
test "assets raise AssetNotPrecompiledError when manifest file is present and requested file isn't precompiled if digest is disabled" do
app_file "app/views/posts/index.html.erb", "<%= javascript_include_tag 'app' %>"
add_to_config "config.assets.compile = false"
+ add_to_config "config.assets.digest = false"
app_file "config/routes.rb", <<-RUBY
AppTemplate::Application.routes.draw do
@@ -250,14 +251,16 @@ def show_detailed_exceptions?() true end
end
RUBY
- ENV["RAILS_ENV"] = "development"
+ ENV["RAILS_ENV"] = "production"
precompile!
# Create file after of precompile
app_file "app/assets/javascripts/app.js", "alert();"
require "#{app_path}/config/environment"
- class ::PostsController < ActionController::Base ; end
+ class ::PostsController < ActionController::Base
+ def show_detailed_exceptions?() true end
+ end
get '/posts'
assert_match(/AssetNotPrecompiledError/, last_response.body)
Please sign in to comment.
Something went wrong with that request. Please try again.