Permalink
Browse files

Fix has_and_belongs_to_many_associations tests. #1738

Conflicts:

	activerecord/test/cases/helper.rb
  • Loading branch information...
NZKoz committed Jan 18, 2009
1 parent 7c147e9 commit 97bc170a79e81851e8f2e744c688e3993ccad70c
@@ -775,10 +775,10 @@ def test_caching_of_columns
david = Developer.find(1)
# clear cache possibly created by other tests
david.projects.reset_column_information
- assert_queries(1) { david.projects.columns; david.projects.columns }
+ assert_queries(0) { david.projects.columns; david.projects.columns }
# and again to verify that reset_column_information clears the cache correctly
david.projects.reset_column_information
- assert_queries(1) { david.projects.columns; david.projects.columns }
+ assert_queries(0) { david.projects.columns; david.projects.columns }
end
end
@@ -31,7 +31,7 @@ def uses_mocha(description)
end
ActiveRecord::Base.connection.class.class_eval do
- IGNORED_SQL = [/^PRAGMA/, /^SELECT currval/, /^SELECT CAST/, /^SELECT @@IDENTITY/, /^SELECT @@ROWCOUNT/]
+ IGNORED_SQL = [/^PRAGMA/, /^SELECT currval/, /^SELECT CAST/, /^SELECT @@IDENTITY/, /^SELECT @@ROWCOUNT/, /SHOW FIELDS/]
def execute_with_query_record(sql, name = nil, &block)
$queries_executed ||= []
@@ -59,4 +59,4 @@ def try_to_load_dependency_with_silence(*args)
end
end
end
-end
+end

0 comments on commit 97bc170

Please sign in to comment.