Skip to content

Commit

Permalink
Improved test code [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Oct 30, 2022
1 parent b752380 commit 3bceaef
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,16 @@ def schema_migration
schema_migration.create_table

ActiveRecord::Schema.define do
enable_extension "citext" if $adapter == "postgresql"
if $adapter == "postgresql"
# for change column
enable_extension "citext"

# for exclusion constraints
enable_extension "btree_gist" if $adapter == "postgresql"
# for exclusion constraints
enable_extension "btree_gist"

# for gen_random_uuid() in Postgres < 13
enable_extension "pgcrypto" if $adapter == "postgresql"
# for gen_random_uuid() in Postgres < 13
enable_extension "pgcrypto"
end

[:users, :new_users, :orders, :devices, :cities_users].each do |table|
drop_table(table) if table_exists?(table)
Expand Down

0 comments on commit 3bceaef

Please sign in to comment.