aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorHongli Lai (Phusion <hongli@phusion.nl>2008-08-26 15:59:03 +0200
committerMichael Koziarski <michael@koziarski.com>2008-08-26 16:28:41 +0200
commitc111522d5b8cd108756240a0348d515d6acee46c (patch)
tree22d11cb429aae9fbe439beb9435966fcdce5877b /railties/test
parentf9f1ab4e3ddeacadf2a7bce021d742f08f67905f (diff)
downloadrails-c111522d5b8cd108756240a0348d515d6acee46c.tar.gz
rails-c111522d5b8cd108756240a0348d515d6acee46c.tar.bz2
rails-c111522d5b8cd108756240a0348d515d6acee46c.zip
The 'rails' command was broken by the last commit. Fix that.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/error_page_test.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/railties/test/error_page_test.rb b/railties/test/error_page_test.rb
index 0e43700eb6..844f889aad 100644
--- a/railties/test/error_page_test.rb
+++ b/railties/test/error_page_test.rb
@@ -3,10 +3,12 @@ require 'action_controller'
require 'action_controller/test_process'
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
- File.expand_path(File.join(File.dirname(__FILE__), "..", "html"))
+ CURRENT_DIR
end
end
@@ -30,6 +32,10 @@ class ErrorPageControllerTest < Test::Unit::TestCase
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)