Permalink
Browse files

Merge pull request #7883 from guilleiguaran/refactor-assets-test

Minor refactors in assets test
  • Loading branch information...
2 parents 9492cb0 + 69b1716 commit c95bdf757eefff71c1753066991caeaefb4329e1 @rafaelfranca rafaelfranca committed Oct 9, 2012
Showing with 1 addition and 16 deletions.
  1. +1 −1 railties/test/application/asset_debugging_test.rb
  2. +0 −15 railties/test/application/assets_test.rb
@@ -50,7 +50,7 @@ class ::PostsController < ActionController::Base ; end
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"
@@ -396,21 +396,6 @@ class ::PostsController < ActionController::Base ; end
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 ."

0 comments on commit c95bdf7

Please sign in to comment.