diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-07-16 17:45:28 -0500 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-07-16 17:45:28 -0500 |
commit | 73ade4fe100ae7f48c5f95dcdf7067f6a0cd51fa (patch) | |
tree | 2f1601292978a844226e16f3cef428ed760b9eb5 /actionpack/test/controller/render_test.rb | |
parent | 8fe01de2e8753d045408ecde3178ab4e9192bf9a (diff) | |
parent | 90c930f45c5c6766306929241462ffff8f67b86e (diff) | |
download | rails-73ade4fe100ae7f48c5f95dcdf7067f6a0cd51fa.tar.gz rails-73ade4fe100ae7f48c5f95dcdf7067f6a0cd51fa.tar.bz2 rails-73ade4fe100ae7f48c5f95dcdf7067f6a0cd51fa.zip |
Resolved conflict
Diffstat (limited to 'actionpack/test/controller/render_test.rb')
-rw-r--r-- | actionpack/test/controller/render_test.rb | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb index 65862c6b14..9a94db4b00 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -101,12 +101,7 @@ class TestController < ActionController::Base end def render_line_offset - begin - render :inline => '<% raise %>', :locals => {:foo => 'bar'} - rescue => exc - end - line = exc.backtrace.first - render :text => line + render :inline => '<% raise %>', :locals => {:foo => 'bar'} end def heading @@ -217,9 +212,6 @@ class TestController < ActionController::Base end end -TestController.view_paths = [FIXTURE_LOAD_PATH] -Fun::GamesController.view_paths = [FIXTURE_LOAD_PATH] - class RenderTest < Test::Unit::TestCase def setup @request = ActionController::TestRequest.new @@ -241,10 +233,15 @@ class RenderTest < Test::Unit::TestCase end def test_line_offset - get :render_line_offset - line = @response.body - assert(line =~ %r{:(\d+):}) - assert_equal "1", $1 + begin + get :render_line_offset + flunk "the action should have raised an exception" + rescue RuntimeError => exc + line = exc.backtrace.first + assert(line =~ %r{:(\d+):}) + assert_equal "1", $1, + "The line offset is wrong, perhaps the wrong exception has been raised, exception was: #{exc.inspect}" + end end def test_render_with_forward_slash |