Commit 9b0375df authored by Robert Speicher's avatar Robert Speicher

Refactor schema_spec.rb for CE-EE parity and simplicity

parent ddc8f14c
......@@ -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