Skip to content
This repository
Browse code

The 'rails' command was broken by the last commit. Fix that.

Signed-off-by: Michael Koziarski <michael@koziarski.com>
  • Loading branch information...
commit c111522d5b8cd108756240a0348d515d6acee46c 1 parent f9f1ab4
Hongli Lai FooBarWidget authored NZKoz committed
1  .gitignore
@@ -12,4 +12,5 @@ actionpack/pkg
12 12 actionmailer/pkg
13 13 activesupport/pkg
14 14 railties/pkg
  15 +railties/test/500.html
15 16 *.rbc
5 railties/html/500.html
@@ -26,7 +26,8 @@
26 26 <h1>We're sorry, but something went wrong.</h1>
27 27 <p>We've been notified about this issue and we'll take a look at it shortly.</p>
28 28 <p><small>(If you're the administrator of this website, then please read
29   - the log file "<%=h RAILS_ENV %>.log" to find out what went wrong.)</small></p>
  29 + the log file "<%= "<%s>" % "%=h RAILS_ENV %" %>.log"
  30 + to find out what went wrong.)</small></p>
30 31 </div>
31 32 </body>
32   -</html>
  33 +</html>
8 railties/test/error_page_test.rb
@@ -3,10 +3,12 @@
3 3 require 'action_controller/test_process'
4 4
5 5 RAILS_ENV = "test"
  6 +CURRENT_DIR = File.expand_path(File.dirname(__FILE__))
  7 +HTML_DIR = File.expand_path(File.join(CURRENT_DIR, "..", "html"))
6 8
7 9 module Rails
8 10 def self.public_path
9   - File.expand_path(File.join(File.dirname(__FILE__), "..", "html"))
  11 + CURRENT_DIR
10 12 end
11 13 end
12 14
@@ -30,6 +32,10 @@ def setup
30 32 end
31 33
32 34 def test_500_error_page_instructs_system_administrator_to_check_log_file
  35 + template = ERB.new(File.read(File.join(HTML_DIR, "500.html")))
  36 + File.open(File.join(CURRENT_DIR, "500.html"), "w") do |f|
  37 + f.write(template.result)
  38 + end
33 39 get :crash
34 40 expected_log_file = "#{RAILS_ENV}.log"
35 41 assert_not_nil @response.body.index(expected_log_file)

0 comments on commit c111522

Please sign in to comment.
Something went wrong with that request. Please try again.