diff options
author | Yves Senn <yves.senn@gmail.com> | 2014-08-29 09:28:59 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2014-08-29 09:41:52 +0200 |
commit | 82cb3de461d15c1e59b49465ce714594a45b7f5f (patch) | |
tree | e0a0d187c046541bac18ae1a8c21bf0640bee01c /activerecord | |
parent | 82a9ce86f1041fced63b008597d4d8ad9671d941 (diff) | |
download | rails-82cb3de461d15c1e59b49465ce714594a45b7f5f.tar.gz rails-82cb3de461d15c1e59b49465ce714594a45b7f5f.tar.bz2 rails-82cb3de461d15c1e59b49465ce714594a45b7f5f.zip |
Revert "Merge pull request #16254 from zuhao/refactor_activerecord_attribute_decorators_test"
This reverts commit 16fe19831548f108c113094d106663497fc190d5, reversing
changes made to 4c81c8ce533896be28bdc0b055ff30bb9dee1316.
The call to `Model.reset_column_information` was to express the intent of the test.
`reset_column_information` itself can trigger SQL queries because it checks
for a tables existance. Let's move it outside of the block.
/cc @sgrif
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/attribute_decorators_test.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/cases/attribute_decorators_test.rb b/activerecord/test/cases/attribute_decorators_test.rb index cbc2c4e5d7..32977b805f 100644 --- a/activerecord/test/cases/attribute_decorators_test.rb +++ b/activerecord/test/cases/attribute_decorators_test.rb @@ -44,6 +44,7 @@ module ActiveRecord end test "decoration does not eagerly load existing columns" do + Model.reset_column_information assert_no_queries do Model.decorate_attribute_type(:a_string, :test) { |t| StringDecorator.new(t) } end |