Permalink
Browse files

Merge pull request #9876 from macksmind/restore_cols_dropped_by_hstor…

…e_test

Restore columns dropped by hstore test
  • Loading branch information...
2 parents 1707763 + 524ce56 commit c56e6204dbc622f40745e6e5f22172b435e3b962 @rafaelfranca rafaelfranca committed Mar 26, 2013
Showing with 5 additions and 15 deletions.
  1. +5 −15 activerecord/test/cases/adapters/postgresql/hstore_test.rb
@@ -40,25 +40,15 @@ def test_hstore_included_in_extensions
assert @connection.extensions.include?('hstore'), "extension list should include hstore"
end
- def test_hstore_enabled
+ def test_disable_enable_hstore
assert @connection.extension_enabled?('hstore')
- end
-
- def test_disable_hstore
- if @connection.extension_enabled?('hstore')
- @connection.disable_extension 'hstore'
- assert_not @connection.extension_enabled?('hstore')
- end
- end
-
- def test_enable_hstore
- if @connection.extension_enabled?('hstore')
- @connection.disable_extension 'hstore'
- end
-
+ @connection.disable_extension 'hstore'
assert_not @connection.extension_enabled?('hstore')
@connection.enable_extension 'hstore'
assert @connection.extension_enabled?('hstore')
+ ensure
+ # Restore column(s) dropped by `drop extension hstore cascade;`
+ load_schema
end
def test_column

0 comments on commit c56e620

Please sign in to comment.