diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-21 14:42:28 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-21 14:42:28 -0700 |
commit | b7e4a97ab54f914bc464d9b3c7d8e579dd402771 (patch) | |
tree | 08e5fa1afff3b9a7630d0355d0ad3f9efc5caebb /activerecord/test | |
parent | 953d129bb200924db1bf11c25e893416ca93339c (diff) | |
download | rails-b7e4a97ab54f914bc464d9b3c7d8e579dd402771.tar.gz rails-b7e4a97ab54f914bc464d9b3c7d8e579dd402771.tar.bz2 rails-b7e4a97ab54f914bc464d9b3c7d8e579dd402771.zip |
fixing tests. woo
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/helper.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/activerecord/test/cases/helper.rb b/activerecord/test/cases/helper.rb index 19a8a97c1a..2d3047c875 100644 --- a/activerecord/test/cases/helper.rb +++ b/activerecord/test/cases/helper.rb @@ -57,14 +57,17 @@ ActiveRecord::Base.connection.class.class_eval do alias_method_chain :execute, :query_record end -ActiveRecord::Base.connection.extend Module.new { +ActiveRecord::Base.connection.class.class_eval { attr_accessor :column_calls - def columns(*args) + + def columns_with_calls(*args) + @column_calls ||= 0 @column_calls += 1 - super + columns_without_calls(*args) end + + alias_method_chain :columns, :calls } -ActiveRecord::Base.connection.column_calls = 0 unless ENV['FIXTURE_DEBUG'] module ActiveRecord::TestFixtures::ClassMethods |