diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-01 18:05:59 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-01 18:05:59 -0700 |
commit | ffbcb84c215bb615a3db4bb8bf8dcb977e72e32b (patch) | |
tree | 61ba7cb20089f5bab178dadebe6b27cea6b883dd | |
parent | 44f85678e967f1eccfaf448f82ca81111c9584af (diff) | |
download | rails-ffbcb84c215bb615a3db4bb8bf8dcb977e72e32b.tar.gz rails-ffbcb84c215bb615a3db4bb8bf8dcb977e72e32b.tar.bz2 rails-ffbcb84c215bb615a3db4bb8bf8dcb977e72e32b.zip |
removing more duplicate code
-rw-r--r-- | actionpack/test/abstract_unit.rb | 17 | ||||
-rw-r--r-- | actionpack/test/controller/rescue_test.rb | 16 | ||||
-rw-r--r-- | actionpack/test/dispatch/show_exceptions_test.rb | 14 |
3 files changed, 17 insertions, 30 deletions
diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb index bf6d43da08..470b36dbe2 100644 --- a/actionpack/test/abstract_unit.rb +++ b/actionpack/test/abstract_unit.rb @@ -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 + diff --git a/actionpack/test/controller/rescue_test.rb b/actionpack/test/controller/rescue_test.rb index a2418bb7c0..c445285538 100644 --- a/actionpack/test/controller/rescue_test.rb +++ b/actionpack/test/controller/rescue_test.rb @@ -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 diff --git a/actionpack/test/dispatch/show_exceptions_test.rb b/actionpack/test/dispatch/show_exceptions_test.rb index 4ede1ab47c..ce6c397e32 100644 --- a/actionpack/test/dispatch/show_exceptions_test.rb +++ b/actionpack/test/dispatch/show_exceptions_test.rb @@ -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) |