diff options
-rw-r--r-- | actionpack/lib/action_controller/assertions.rb | 10 | ||||
-rw-r--r-- | actionpack/test/controller/action_pack_assertions_test.rb | 4 |
2 files changed, 6 insertions, 8 deletions
diff --git a/actionpack/lib/action_controller/assertions.rb b/actionpack/lib/action_controller/assertions.rb index 999edc1440..baf36f768d 100644 --- a/actionpack/lib/action_controller/assertions.rb +++ b/actionpack/lib/action_controller/assertions.rb @@ -309,12 +309,10 @@ module Test #:nodoc: end def clean_backtrace(&block) - begin - yield - rescue AssertionFailedError => e - path = File.expand_path(__FILE__) - raise AssertionFailedError, e.message, e.backtrace.reject { |line| File.expand_path(line) =~ /#{path}/ } - end + yield + rescue AssertionFailedError => e + path = File.expand_path(__FILE__) + raise AssertionFailedError, e.message, e.backtrace.reject { |line| File.expand_path(line) =~ /#{path}/ } end end end diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb index 6d5ade98bf..ed4ed7ca62 100644 --- a/actionpack/test/controller/action_pack_assertions_test.rb +++ b/actionpack/test/controller/action_pack_assertions_test.rb @@ -87,7 +87,7 @@ class ActionPackAssertionsController < ActionController::Base def errors Class.new do - def full_messages; '...stuff...'; end + def full_messages; []; end end.new end @@ -106,7 +106,7 @@ class ActionPackAssertionsController < ActionController::Base def errors Class.new do - def full_messages; '...stuff...'; end + def full_messages; ['...stuff...']; end end.new end end.new |