1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Revert ":cut: remove unnecessary rescue Exceptions"

This reverts commit ff18049ca6.

This broke the AR build for every adapter:

      1) Error:
    AssociationCallbacksTest#test_dont_add_if_before_callback_raises_exception:
    Exception: You can't add a post

      2) Failure:
    QueryCacheTest#test_query_cache_doesnt_leak_cached_results_of_rolled_back_queries [/Users/senny/Projects/rails/activerecord/test/cases/query_cache_test.rb:235]:
    Expected: 1
      Actual: 0

I'm reverting to get the build green again.
This commit is contained in:
Yves Senn 2015-03-06 12:13:40 +01:00
parent bfbabc59d5
commit a068aa3e86
3 changed files with 3 additions and 3 deletions

View file

@ -10,7 +10,7 @@ def run_without_aborting(*tasks)
tasks.each do |task|
begin
Rake::Task[task].invoke
rescue
rescue Exception
errors << task
end
end

View file

@ -180,7 +180,7 @@ class AssociationCallbacksTest < ActiveRecord::TestCase
assert !@david.unchangable_posts.include?(@authorless)
begin
@david.unchangable_posts << @authorless
rescue
rescue Exception
end
assert @david.post_log.empty?
assert !@david.unchangable_posts.include?(@authorless)

View file

@ -235,7 +235,7 @@ class QueryCacheTest < ActiveRecord::TestCase
assert_equal 1, Post.where(title: 'rollback').to_a.count
raise 'broken'
end
rescue
rescue Exception
end
assert_equal 0, Post.where(title: 'rollback').to_a.count