From f159b0a5a8e0c43942e8d60eb27a51f2679afa3e Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Wed, 2 Apr 2014 09:03:48 +0200 Subject: [PATCH] cleanup, `reset_pg_session` in range_test.rb Also do not use transactional fixtures. We drop the type and the table after every run, so there is nothing for the transaction to clean up. --- activerecord/test/cases/adapters/postgresql/range_test.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/activerecord/test/cases/adapters/postgresql/range_test.rb b/activerecord/test/cases/adapters/postgresql/range_test.rb index a9d4312fb3..b57568dbad 100644 --- a/activerecord/test/cases/adapters/postgresql/range_test.rb +++ b/activerecord/test/cases/adapters/postgresql/range_test.rb @@ -1,4 +1,5 @@ require "cases/helper" +require 'support/postgresql_helper' require 'active_record/base' require 'active_record/connection_adapters/postgresql_adapter' @@ -8,17 +9,19 @@ if ActiveRecord::Base.connection.supports_ranges? end class PostgresqlRangeTest < ActiveRecord::TestCase + self.use_transactional_fixtures = false + include PostgresqlHelper + teardown do @connection.execute 'DROP TABLE IF EXISTS postgresql_ranges' @connection.execute 'DROP TYPE IF EXISTS floatrange' + reset_pg_session end def setup @connection = PostgresqlRange.connection begin @connection.transaction do - @connection.execute 'DROP TABLE IF EXISTS postgresql_ranges' - @connection.execute 'DROP TYPE IF EXISTS floatrange' @connection.execute <<_SQL CREATE TYPE floatrange AS RANGE ( subtype = float8,