diff options
author | Yves Senn <yves.senn@gmail.com> | 2014-04-02 09:03:48 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2014-04-02 09:03:48 +0200 |
commit | f159b0a5a8e0c43942e8d60eb27a51f2679afa3e (patch) | |
tree | 1bd9ce03c6abe8ecb67d223ffd3f14f6609ad35a /activerecord/test | |
parent | 793412418489f85758cc60229b95e8508cf7b776 (diff) | |
download | rails-f159b0a5a8e0c43942e8d60eb27a51f2679afa3e.tar.gz rails-f159b0a5a8e0c43942e8d60eb27a51f2679afa3e.tar.bz2 rails-f159b0a5a8e0c43942e8d60eb27a51f2679afa3e.zip |
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.
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/range_test.rb | 7 |
1 files 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, |