Commit 8cd6ffab authored by Nick Thomas's avatar Nick Thomas

Merge branch 'rs-schema-spec-parity' into 'master'

Refactor schema_spec.rb for CE-EE parity and simplicity

See merge request gitlab-org/gitlab-ce!19563
parents b32f3685 b00b8618
......@@ -5,7 +5,11 @@ require 'spec_helper'
describe ActiveRecord::Schema do
let(:latest_migration_timestamp) do
migrations = Dir[Rails.root.join('db', 'migrate', '*'), Rails.root.join('db', 'post_migrate', '*')]
migrations_paths = %w[db ee/db]
.product(%w[migrate post_migrate])
.map { |path| Rails.root.join(*path, '*') }
migrations = Dir[*migrations_paths]
migrations.map { |migration| File.basename(migration).split('_').first.to_i }.max
end
......
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