aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/test/database/setup.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activestorage/test/database/setup.rb')
-rw-r--r--activestorage/test/database/setup.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/activestorage/test/database/setup.rb b/activestorage/test/database/setup.rb
new file mode 100644
index 0000000000..705650a25d
--- /dev/null
+++ b/activestorage/test/database/setup.rb
@@ -0,0 +1,7 @@
+# frozen_string_literal: true
+
+require_relative "create_users_migration"
+
+ActiveRecord::Base.establish_connection(adapter: "sqlite3", database: ":memory:")
+ActiveRecord::Migrator.migrate File.expand_path("../../db/migrate", __dir__)
+ActiveStorageCreateUsers.migrate(:up)