aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionview/test/actionpack/controller/render_test.rb22
1 files changed, 19 insertions, 3 deletions
diff --git a/actionview/test/actionpack/controller/render_test.rb b/actionview/test/actionpack/controller/render_test.rb
index 8b47536a18..ecebd2d8c5 100644
--- a/actionview/test/actionpack/controller/render_test.rb
+++ b/actionview/test/actionpack/controller/render_test.rb
@@ -1,5 +1,6 @@
require 'abstract_unit'
-require "active_model"
+require 'active_model'
+require 'fileutils'
class ApplicationController < ActionController::Base
self.view_paths = File.join(FIXTURE_LOAD_PATH, "actionpack")
@@ -678,6 +679,14 @@ class RenderTest < ActionController::TestCase
ActionView::Base.logger = nil
end
+ def case_sensitive_file_system?
+ fname = '.case_sensitive_file_system_test'
+ FileUtils.touch(fname)
+ !File.exists?(fname.upcase)
+ ensure
+ FileUtils.rm_f(fname)
+ end
+
# :ported:
def test_simple_show
get :hello_world
@@ -747,8 +756,15 @@ class RenderTest < ActionController::TestCase
end
def test_render_action_upcased
- assert_raise ActionView::MissingTemplate do
- get :render_action_upcased_hello_world
+ action = :render_action_upcased_hello_world
+
+ if case_sensitive_file_system?
+ assert_raise ActionView::MissingTemplate do
+ get action
+ end
+ else
+ get action
+ assert_template 'test/Hello_world'
end
end