diff options
Diffstat (limited to 'spec/support/helpers/migrations_helpers.rb')
-rw-r--r-- | spec/support/helpers/migrations_helpers.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/support/helpers/migrations_helpers.rb b/spec/support/helpers/migrations_helpers.rb index 0c5bf09f6b7..e7dd2d54aee 100644 --- a/spec/support/helpers/migrations_helpers.rb +++ b/spec/support/helpers/migrations_helpers.rb @@ -104,9 +104,9 @@ module MigrationsHelpers stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false') end - def previous_migration - migrations.each_cons(2) do |previous, migration| - break previous if migration.name == described_class.name + def previous_migration(steps_back = 2) + migrations.each_cons(steps_back) do |cons| + break cons.first if cons.last.name == described_class.name end end |