Skip to content
This repository
Browse code

Update asset test to match one in sprockets-rails

  • Loading branch information...
commit fd8b9bee47799af3b112e9d92d50739cec43da63 1 parent ec28c05
Guillermo Iguaran authored September 21, 2012

Showing 1 changed file with 5 additions and 2 deletions. Show diff stats Hide diff stats

  1. 7  railties/test/application/assets_test.rb
7  railties/test/application/assets_test.rb
@@ -236,6 +236,7 @@ def show_detailed_exceptions?() true end
236 236
     test "assets raise AssetNotPrecompiledError when manifest file is present and requested file isn't precompiled if digest is disabled" do
237 237
       app_file "app/views/posts/index.html.erb", "<%= javascript_include_tag 'app' %>"
238 238
       add_to_config "config.assets.compile = false"
  239
+      add_to_config "config.assets.digest = false"
239 240
 
240 241
       app_file "config/routes.rb", <<-RUBY
241 242
         AppTemplate::Application.routes.draw do
@@ -243,14 +244,16 @@ def show_detailed_exceptions?() true end
243 244
         end
244 245
       RUBY
245 246
 
246  
-      ENV["RAILS_ENV"] = "development"
  247
+      ENV["RAILS_ENV"] = "production"
247 248
       precompile!
248 249
 
249 250
       # Create file after of precompile
250 251
       app_file "app/assets/javascripts/app.js", "alert();"
251 252
 
252 253
       require "#{app_path}/config/environment"
253  
-      class ::PostsController < ActionController::Base ; end
  254
+      class ::PostsController < ActionController::Base
  255
+        def show_detailed_exceptions?() true end
  256
+      end
254 257
 
255 258
       get '/posts'
256 259
       assert_match(/AssetNotPrecompiledError/, last_response.body)

0 notes on commit fd8b9be

Please sign in to comment.
Something went wrong with that request. Please try again.