removing more duplicate code

This commit is contained in:
Aaron Patterson 2010-10-01 18:05:59 -07:00
parent 44f85678e9
commit ffbcb84c21
3 changed files with 17 additions and 30 deletions

View File

@ -326,3 +326,20 @@ class Workshop
id.to_s
end
end
module ActionDispatch
class ShowExceptions
private
remove_method :public_path
def public_path
"#{FIXTURE_LOAD_PATH}/public"
end
remove_method :logger
# Silence logger
def logger
nil
end
end
end

View File

@ -1,21 +1,5 @@
require 'abstract_unit'
module ActionDispatch
class ShowExceptions
private
remove_method :public_path
def public_path
"#{FIXTURE_LOAD_PATH}/public"
end
remove_method :logger
# Silence logger
def logger
nil
end
end
end
class RescueController < ActionController::Base
class NotAuthorized < StandardError
end

View File

@ -1,19 +1,5 @@
require 'abstract_unit'
module ActionDispatch
class ShowExceptions
private
def public_path
"#{FIXTURE_LOAD_PATH}/public"
end
# Silence logger
def logger
nil
end
end
end
class ShowExceptionsTest < ActionDispatch::IntegrationTest
Boomer = lambda do |env|
req = ActionDispatch::Request.new(env)