提交 c9cab9c7 编写于 作者: T Thiago Pradi

Cleaning unused methods from abstract_unit

上级 e30a7e03
......@@ -49,20 +49,6 @@ def env
ORIGINAL_LOCALES = I18n.available_locales.map(&:to_s).sort
FIXTURE_LOAD_PATH = File.join(File.dirname(__FILE__), 'fixtures')
FIXTURES = Pathname.new(FIXTURE_LOAD_PATH)
module RackTestUtils
def body_to_string(body)
if body.respond_to?(:each)
str = ""
body.each {|s| str << s }
str
else
body
end
end
extend self
end
module RenderERBUtils
def view
......@@ -225,49 +211,6 @@ def with_autoload_path(path)
end
end
# Temporary base class
class Rack::TestCase < ActionDispatch::IntegrationTest
def self.testing(klass = nil)
if klass
@testing = "/#{klass.name.underscore}".sub!(/_controller$/, '')
else
@testing
end
end
def get(thing, *args)
if thing.is_a?(Symbol)
super("#{self.class.testing}/#{thing}", *args)
else
super
end
end
def assert_body(body)
assert_equal body, Array(response.body).join
end
def assert_status(code)
assert_equal code, response.status
end
def assert_response(body, status = 200, headers = {})
assert_body body
assert_status status
headers.each do |header, value|
assert_header header, value
end
end
def assert_content_type(type)
assert_equal type, response.headers["Content-Type"]
end
def assert_header(name, value)
assert_equal value, response.headers[name]
end
end
ActionView::RoutingUrlFor.include(ActionDispatch::Routing::UrlFor)
module ActionController
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册