mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
skip hstore tests on PG databases that do not have hstore
This commit is contained in:
parent
a8b948d81c
commit
0d7ca94727
1 changed files with 8 additions and 2 deletions
|
@ -7,8 +7,14 @@ class PostgresqlHstoreTest < ActiveRecord::TestCase
|
|||
|
||||
def setup
|
||||
@connection = ActiveRecord::Base.connection
|
||||
@connection.create_table('hstores') do |t|
|
||||
t.hstore 'tags'
|
||||
begin
|
||||
@connection.transaction do
|
||||
@connection.create_table('hstores') do |t|
|
||||
t.hstore 'tags'
|
||||
end
|
||||
end
|
||||
rescue ActiveRecord::StatementInvalid
|
||||
return skip "do not test on PG without hstore"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue