diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-12-20 14:03:45 -0600 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-12-20 14:04:51 -0600 |
commit | 0d7ca947272e4eff0c0447c5760d1b53167b685b (patch) | |
tree | c6fa6b9da41db4e867cceee7e7cc028f8adf506f /activerecord/test | |
parent | a8b948d81c6c7aa5beac0e98259c12c067f4bd32 (diff) | |
download | rails-0d7ca947272e4eff0c0447c5760d1b53167b685b.tar.gz rails-0d7ca947272e4eff0c0447c5760d1b53167b685b.tar.bz2 rails-0d7ca947272e4eff0c0447c5760d1b53167b685b.zip |
skip hstore tests on PG databases that do not have hstore
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/hstore_test.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/hstore_test.rb b/activerecord/test/cases/adapters/postgresql/hstore_test.rb index b350094cc7..33bf4478cc 100644 --- a/activerecord/test/cases/adapters/postgresql/hstore_test.rb +++ b/activerecord/test/cases/adapters/postgresql/hstore_test.rb @@ -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 |