Commit b00b8618 authored by Robert Speicher's avatar Robert Speicher

Refactor schema_spec.rb for CE-EE parity and simplicity

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