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' ...@@ -5,10 +5,10 @@ require 'spec_helper'
describe ActiveRecord::Schema do describe ActiveRecord::Schema do
let(:latest_migration_timestamp) do let(:latest_migration_timestamp) do
migrations_paths = migrations_paths = %w[db ee/db]
%w[db ee/db].product(%w[migrate post_migrate]).each_with_object([]) do |migration_dir, memo| .product(%w[migrate post_migrate])
memo << Rails.root.join(*migration_dir, '*') .map { |path| Rails.root.join(*path, '*') }
end
migrations = Dir[*migrations_paths] migrations = Dir[*migrations_paths]
migrations.map { |migration| File.basename(migration).split('_').first.to_i }.max migrations.map { |migration| File.basename(migration).split('_').first.to_i }.max
end 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