diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-10-09 09:57:33 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-10-09 09:57:33 -0700 |
commit | c95bdf757eefff71c1753066991caeaefb4329e1 (patch) | |
tree | 8d1f01c5328ac3ad6dcf07e7a563dc0743e8a60a /railties | |
parent | 9492cb025735c6e90d114f5681384c5119049051 (diff) | |
parent | 69b1716d2366fe425a21efaecace64c73fa4a5fc (diff) | |
download | rails-c95bdf757eefff71c1753066991caeaefb4329e1.tar.gz rails-c95bdf757eefff71c1753066991caeaefb4329e1.tar.bz2 rails-c95bdf757eefff71c1753066991caeaefb4329e1.zip |
Merge pull request #7883 from guilleiguaran/refactor-assets-test
Minor refactors in assets test
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/application/asset_debugging_test.rb | 2 | ||||
-rw-r--r-- | railties/test/application/assets_test.rb | 15 |
2 files changed, 1 insertions, 16 deletions
diff --git a/railties/test/application/asset_debugging_test.rb b/railties/test/application/asset_debugging_test.rb index ecacb34cb2..ebafc7d670 100644 --- a/railties/test/application/asset_debugging_test.rb +++ b/railties/test/application/asset_debugging_test.rb @@ -50,7 +50,7 @@ module ApplicationTests end test "assets aren't concatened when compile is true is on and debug_assets params is true" do - app_file "config/initializers/compile.rb", "Rails.application.config.assets.compile = true" + add_to_env_config "production", "config.assets.compile = true" ENV["RAILS_ENV"] = "production" require "#{app_path}/config/environment" diff --git a/railties/test/application/assets_test.rb b/railties/test/application/assets_test.rb index 12223287ba..be97855e1a 100644 --- a/railties/test/application/assets_test.rb +++ b/railties/test/application/assets_test.rb @@ -396,21 +396,6 @@ module ApplicationTests assert_no_match(/<script src="\/assets\/xmlhr-([0-z]+)\.js"><\/script>/, last_response.body) end - test "assets aren't concatened when compile is true is on and debug_assets params is true" do - app_with_assets_in_view - add_to_env_config "production", "config.assets.compile = true" - add_to_env_config "production", "config.assets.allow_debugging = true" - - ENV["RAILS_ENV"] = "production" - require "#{app_path}/config/environment" - - class ::PostsController < ActionController::Base ; end - - get '/posts?debug_assets=true' - assert_match(/<script src="\/assets\/application-([0-z]+)\.js\?body=1"><\/script>/, last_response.body) - assert_match(/<script src="\/assets\/xmlhr-([0-z]+)\.js\?body=1"><\/script>/, last_response.body) - end - test "assets can access model information when precompiling" do app_file "app/models/post.rb", "class Post; end" app_file "app/assets/javascripts/application.js", "//= require_tree ." |