提交 ff18049c 编写于 作者: A Aaron Patterson

:cut: remove unnecessary rescue Exceptions

上级 67c1fa93
......@@ -10,7 +10,7 @@ def run_without_aborting(*tasks)
tasks.each do |task|
begin
Rake::Task[task].invoke
rescue Exception
rescue
errors << task
end
end
......
......@@ -180,7 +180,7 @@ def test_dont_add_if_before_callback_raises_exception
assert !@david.unchangable_posts.include?(@authorless)
begin
@david.unchangable_posts << @authorless
rescue Exception
rescue
end
assert @david.post_log.empty?
assert !@david.unchangable_posts.include?(@authorless)
......
......@@ -235,7 +235,7 @@ def test_query_cache_doesnt_leak_cached_results_of_rolled_back_queries
assert_equal 1, Post.where(title: 'rollback').to_a.count
raise 'broken'
end
rescue Exception
rescue
end
assert_equal 0, Post.where(title: 'rollback').to_a.count
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册