diff options
author | Robert Speicher <rspeicher@gmail.com> | 2018-06-07 23:46:25 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2018-06-07 23:47:30 +0300 |
commit | b00b861863bd963224593846791ea0b6993d9b88 (patch) | |
tree | 6f66db7dcaf3242d26aa0082b3126279681899f3 /spec/migrations/active_record | |
parent | c9e3a73efd6339706ad88837f78f017e0a55d809 (diff) |
Refactor schema_spec.rb for CE-EE parity and simplicity
Diffstat (limited to 'spec/migrations/active_record')
-rw-r--r-- | spec/migrations/active_record/schema_spec.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/migrations/active_record/schema_spec.rb b/spec/migrations/active_record/schema_spec.rb index e132529d8d8..9d35b3cd642 100644 --- a/spec/migrations/active_record/schema_spec.rb +++ b/spec/migrations/active_record/schema_spec.rb @@ -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 |