diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-11-24 13:57:19 -0800 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-11-24 13:57:19 -0800 |
commit | 587c2d67ce3279f79b00a23db9c2f42ae59af548 (patch) | |
tree | 21f38ec0cb846648c04957ccd3514f236e48abb9 /actionpack/test | |
parent | 17c29a0df0da5414570b025b642e90968e96cddc (diff) | |
parent | 0bc95ed95adb52e6ad29644da1c1542ce566ce61 (diff) | |
download | rails-587c2d67ce3279f79b00a23db9c2f42ae59af548.tar.gz rails-587c2d67ce3279f79b00a23db9c2f42ae59af548.tar.bz2 rails-587c2d67ce3279f79b00a23db9c2f42ae59af548.zip |
Merge pull request #13020 from razielgn/raise-inspectable-messages
Raise RuntimeErrors with inspectable and MRI-independent messages.
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/new_base/render_streaming_test.rb | 4 | ||||
-rw-r--r-- | actionpack/test/controller/new_base/render_template_test.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/test/controller/new_base/render_streaming_test.rb b/actionpack/test/controller/new_base/render_streaming_test.rb index 2b36a399bb..4c9126ca8c 100644 --- a/actionpack/test/controller/new_base/render_streaming_test.rb +++ b/actionpack/test/controller/new_base/render_streaming_test.rb @@ -4,7 +4,7 @@ module RenderStreaming class BasicController < ActionController::Base self.view_paths = [ActionView::FixtureResolver.new( "render_streaming/basic/hello_world.html.erb" => "Hello world", - "render_streaming/basic/boom.html.erb" => "<%= nil.invalid! %>", + "render_streaming/basic/boom.html.erb" => "<%= raise 'Ruby was here!' %>", "layouts/application.html.erb" => "<%= yield %>, I'm here!", "layouts/boom.html.erb" => "<body class=\"<%= nil.invalid! %>\"<%= yield %></body>" )] @@ -90,7 +90,7 @@ module RenderStreaming begin get "/render_streaming/basic/template_exception" io.rewind - assert_match "(undefined method `invalid!' for nil:NilClass)", io.read + assert_match "Ruby was here!", io.read ensure ActionView::Base.logger = _old end diff --git a/actionpack/test/controller/new_base/render_template_test.rb b/actionpack/test/controller/new_base/render_template_test.rb index 6b2ae2b2a9..b7a9cf92f2 100644 --- a/actionpack/test/controller/new_base/render_template_test.rb +++ b/actionpack/test/controller/new_base/render_template_test.rb @@ -14,7 +14,7 @@ module RenderTemplate "test/with_json.html.erb" => "<%= render :template => 'test/with_json', :formats => [:json] %>", "test/with_json.json.erb" => "<%= render :template => 'test/final', :formats => [:json] %>", "test/final.json.erb" => "{ final: json }", - "test/with_error.html.erb" => "<%= idontexist %>" + "test/with_error.html.erb" => "<%= raise 'i do not exist' %>" )] def index @@ -132,7 +132,7 @@ module RenderTemplate test "rendering a template with error properly excerts the code" do get :with_error assert_status 500 - assert_match "undefined local variable or method `idontexist", response.body + assert_match "i do not exist", response.body end end |