Commit faaca1f7 authored by Thong Kuah's avatar Thong Kuah

Merge branch 'fix/schema_unit_test_db_dir' into 'master'

Refactor migrations_paths of schema spec

See merge request gitlab-org/gitlab!70455
parents 102c945c 8dc1d559
......@@ -7,7 +7,7 @@ require 'spec_helper'
RSpec.describe ActiveRecord::Schema, schema: :latest do
let(:all_migrations) do
migrations_directories = %w[db/migrate db/post_migrate].map { |path| Rails.root.join(path).to_s }
migrations_directories = Rails.application.paths["db/migrate"].paths.map(&:to_s)
migrations_paths = migrations_directories.map { |path| File.join(path, '*') }
migrations = Dir[*migrations_paths] - migrations_directories
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment