diff options
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/hstore_test.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/hstore_test.rb b/activerecord/test/cases/adapters/postgresql/hstore_test.rb index 9498c829dc..331e3f7e4d 100644 --- a/activerecord/test/cases/adapters/postgresql/hstore_test.rb +++ b/activerecord/test/cases/adapters/postgresql/hstore_test.rb @@ -11,11 +11,18 @@ class PostgresqlHstoreTest < ActiveRecord::TestCase def setup @connection = ActiveRecord::Base.connection + + unless @connection.supports_extensions? + return skip "do not test on PG without hstore" + end + unless @connection.extension_enabled?('hstore') @connection.enable_extension 'hstore' - return skip "do not test on PG without hstore" + @connection.commit_db_transaction end + @connection.reconnect! + @connection.transaction do @connection.create_table('hstores') do |t| t.hstore 'tags', :default => '' |