Update asset test to match one in sprockets-rails
This commit is contained in:
parent
ec28c059b7
commit
fd8b9bee47
@ -236,6 +236,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
|
||||
@ -243,14 +244,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)
|
||||
|
Loading…
Reference in New Issue
Block a user