1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #4371 from rafaelfranca/test_unit_cleanup

Test unit cleanup
This commit is contained in:
Aaron Patterson 2012-01-09 09:34:36 -08:00
commit d8516d702c
4 changed files with 7 additions and 19 deletions

View file

@ -431,7 +431,7 @@ module ActionController
def process(action, http_method = 'GET', *args)
check_required_ivars
http_method, args = handle_old_process_api(http_method, args)
http_method, args = handle_old_process_api(http_method, args)
if args.first.is_a?(String)
@request.env['RAW_POST_DATA'] = args.shift

View file

@ -4,7 +4,6 @@ require 'active_support/core_ext/kernel/singleton_class'
require 'active_support/core_ext/object/inclusion'
require 'active_support/core_ext/object/try'
require 'rack/test'
require 'test/unit/assertions'
module ActionDispatch
module Integration #:nodoc:
@ -127,7 +126,7 @@ module ActionDispatch
class Session
DEFAULT_HOST = "www.example.com"
include Test::Unit::Assertions
include MiniTest::Assertions
include TestProcess, RequestHelpers, Assertions
%w( status status_message headers body redirect? ).each do |method|

View file

@ -16,9 +16,11 @@ class ViewLoadPathsTest < ActionController::TestCase
end
end
class Test::SubController < ActionController::Base
layout 'test/sub'
def hello_world; render(:template => 'test/hello_world'); end
module Test
class SubController < ActionController::Base
layout 'test/sub'
def hello_world; render(:template => 'test/hello_world'); end
end
end
def setup

View file

@ -26,17 +26,4 @@ module Rails
add_filter { |line| line.sub(gems_regexp, '\2 (\3) \4') }
end
end
# For installing the BacktraceCleaner in the test/unit
module BacktraceFilterForTestUnit #:nodoc:
def self.included(klass)
klass.send :alias_method_chain, :filter_backtrace, :cleaning
end
def filter_backtrace_with_cleaning(backtrace, prefix=nil)
backtrace = filter_backtrace_without_cleaning(backtrace, prefix)
backtrace = backtrace.first.split("\n") if backtrace.size == 1
Rails.backtrace_cleaner.clean(backtrace)
end
end
end