Commit 8dc1d559 authored by Baodong's avatar Baodong Committed by Thong Kuah

Fix db dir in Schema unit test

parent 115b29aa
......@@ -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