mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
removing more duplicate code
This commit is contained in:
parent
44f85678e9
commit
ffbcb84c21
3 changed files with 17 additions and 30 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue