diff options
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/assertions.rb | 10 |
1 files changed, 4 insertions, 6 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 |