Skip to content

Commit

Permalink
Explictly set the assets digest option to false
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelfranca committed Sep 20, 2012
1 parent 54f5574 commit 9d07ace
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions railties/test/application/assets_test.rb
Expand Up @@ -243,21 +243,24 @@ 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
match '/posts', :to => "posts#index"
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)
Expand Down

0 comments on commit 9d07ace

Please sign in to comment.