Permalink
Browse files

fixing tests. woo

  • Loading branch information...
1 parent a0fc2f7 commit bfd40220757798019742f6c9f2846976b177cce9 @tenderlove tenderlove committed Sep 21, 2010
Showing with 7 additions and 4 deletions.
  1. +7 −4 activerecord/test/cases/helper.rb
@@ -43,14 +43,17 @@ def execute_with_query_record(sql, name = nil, &block)
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

0 comments on commit bfd4022

Please sign in to comment.