From 82cb3de461d15c1e59b49465ce714594a45b7f5f Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Fri, 29 Aug 2014 09:28:59 +0200 Subject: 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 --- activerecord/test/cases/attribute_decorators_test.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activerecord/test') 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 -- cgit v1.2.3