aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2009-02-06 15:22:04 +0100
committerDavid Heinemeier Hansson <david@loudthinking.com>2009-02-06 15:22:04 +0100
commit10b6073968eb43a3e20efd352d97d08720beeb12 (patch)
tree75623d433796f33419c3374ea468a748c4b8eec3 /railties/test
parent7a5da7ce785616d79843dfebbb5107be8b46f8c5 (diff)
downloadrails-10b6073968eb43a3e20efd352d97d08720beeb12.tar.gz
rails-10b6073968eb43a3e20efd352d97d08720beeb12.tar.bz2
rails-10b6073968eb43a3e20efd352d97d08720beeb12.zip
This is no longer relevant when the 500.html is comletely static
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/error_page_test.rb40
1 files changed, 0 insertions, 40 deletions
diff --git a/railties/test/error_page_test.rb b/railties/test/error_page_test.rb
deleted file mode 100644
index f819e468e8..0000000000
--- a/railties/test/error_page_test.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-require 'abstract_unit'
-require 'action_controller'
-require 'action_controller/test_case'
-
-RAILS_ENV = "test"
-CURRENT_DIR = File.expand_path(File.dirname(__FILE__))
-HTML_DIR = File.expand_path(File.join(CURRENT_DIR, "..", "html"))
-
-module Rails
- def self.public_path
- CURRENT_DIR
- end
-end
-
-class ErrorPageController < ActionController::Base
- def crash
- raise StandardError, "crash!"
- end
-end
-
-ActionController::Routing::Routes.draw do |map|
- map.connect ':controller/:action/:id'
-end
-
-class ErrorPageControllerTest < ActionController::TestCase
- def setup
- ActionController::Base.consider_all_requests_local = false
- rescue_action_in_public!
- end
-
- def test_500_error_page_instructs_system_administrator_to_check_log_file
- template = ERB.new(File.read(File.join(HTML_DIR, "500.html")))
- File.open(File.join(CURRENT_DIR, "500.html"), "w") do |f|
- f.write(template.result)
- end
- get :crash
- expected_log_file = "#{RAILS_ENV}.log"
- assert_not_nil @response.body.index(expected_log_file), @response.body
- end
-end