From 1dc2ea8f3dfc1cce1958bd661c641ed345adf910 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 12 Oct 2012 20:44:32 -0700 Subject: Tighten up asset precompile tests --- railties/test/application/asset_debugging_test.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'railties/test/application/asset_debugging_test.rb') diff --git a/railties/test/application/asset_debugging_test.rb b/railties/test/application/asset_debugging_test.rb index ebafc7d670..a7b3ae1e9a 100644 --- a/railties/test/application/asset_debugging_test.rb +++ b/railties/test/application/asset_debugging_test.rb @@ -36,9 +36,8 @@ module ApplicationTests test "assets are concatenated when debug is off and compile is off either if debug_assets param is provided" do # config.assets.debug and config.assets.compile are false for production environment ENV["RAILS_ENV"] = "production" - capture(:stdout) do - Dir.chdir(app_path){ `bundle exec rake assets:precompile` } - end + output = Dir.chdir(app_path){ `bundle exec rake assets:precompile --trace 2>&1` } + assert $?.success?, output require "#{app_path}/config/environment" class ::PostsController < ActionController::Base ; end -- cgit v1.2.3 From 5ad7f8ab418f0c760dbb584f7c78d94ce32e9ee3 Mon Sep 17 00:00:00 2001 From: Robin Dupret Date: Sun, 14 Oct 2012 12:03:39 +0200 Subject: Use Ruby 1.9 Hash syntax in railties --- railties/test/application/asset_debugging_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'railties/test/application/asset_debugging_test.rb') diff --git a/railties/test/application/asset_debugging_test.rb b/railties/test/application/asset_debugging_test.rb index a7b3ae1e9a..1eddfac664 100644 --- a/railties/test/application/asset_debugging_test.rb +++ b/railties/test/application/asset_debugging_test.rb @@ -7,7 +7,7 @@ module ApplicationTests include Rack::Test::Methods def setup - build_app(:initializers => true) + build_app(initializers: true) app_file "app/assets/javascripts/application.js", "//= require_tree ." app_file "app/assets/javascripts/xmlhr.js", "function f1() { alert(); }" @@ -15,7 +15,7 @@ module ApplicationTests app_file "config/routes.rb", <<-RUBY AppTemplate::Application.routes.draw do - get '/posts', :to => "posts#index" + get '/posts', to: "posts#index" end RUBY -- cgit v1.2.3