diff options
author | Xavier Noria <fxn@hashref.com> | 2011-12-03 14:26:34 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-12-03 14:26:34 +0100 |
commit | de24ed9f2d582096fcc5b83984f187c2a094e83a (patch) | |
tree | 80c5b1ab5dccbd10b73e4474181c85704b014c47 /activerecord/test/cases | |
parent | a02691ce09c327e307a02f757c89d3cbd4d5ee56 (diff) | |
download | rails-de24ed9f2d582096fcc5b83984f187c2a094e83a.tar.gz rails-de24ed9f2d582096fcc5b83984f187c2a094e83a.tar.bz2 rails-de24ed9f2d582096fcc5b83984f187c2a094e83a.zip |
removes the convenience instance version of AR::Base.silence_auto_explain
Rationale: As discussed with José and Jon, this convenience
shortcut is not clearly justified and it could let the user
thing the disabled EXPLAINs are related to the model instance
rather than being globally disabled.
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/explain_test.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/activerecord/test/cases/explain_test.rb b/activerecord/test/cases/explain_test.rb index ff460b44eb..0284cca920 100644 --- a/activerecord/test/cases/explain_test.rb +++ b/activerecord/test/cases/explain_test.rb @@ -83,11 +83,8 @@ if ActiveRecord::Base.connection.supports_explain? def test_silence_auto_explain base.expects(:collecting_sqls_for_explain).never base.logger.expects(:warn).never - - [base, cars(:honda)].each do |target| - target.silence_auto_explain do - with_threshold(0) { Car.all } - end + base.silence_auto_explain do + with_threshold(0) { Car.all } end end |