Commit ebfb68be authored by Nick Thomas's avatar Nick Thomas

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

Refactor schema_spec.rb for CE-EE parity and simplicity

See merge request gitlab-org/gitlab-ee!6046
parents 50f409de 9b0375df
......@@ -5,10 +5,10 @@ require 'spec_helper'
describe ActiveRecord::Schema do
let(:latest_migration_timestamp) do
migrations_paths =
%w[db ee/db].product(%w[migrate post_migrate]).each_with_object([]) do |migration_dir, memo|
memo << Rails.root.join(*migration_dir, '*')
end
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