Commit 91655d81 authored by Markus Koller's avatar Markus Koller

Merge branch 'rf-migration-spec-helper-bugfix' into 'master'

Migration name was nil in failure messages

See merge request gitlab-org/gitlab!75753
parents 982d339b 5c62b4e7
...@@ -9,7 +9,7 @@ RSpec::Matchers.define :be_background_migration_with_arguments do |arguments| ...@@ -9,7 +9,7 @@ RSpec::Matchers.define :be_background_migration_with_arguments do |arguments|
end end
RSpec::Matchers.define :be_scheduled_delayed_migration do |delay, *expected| RSpec::Matchers.define :be_scheduled_delayed_migration do |delay, *expected|
define_method :matches? do |migration| match(notify_expectation_failures: true) do |migration|
expect(migration).to be_background_migration_with_arguments(expected) expect(migration).to be_background_migration_with_arguments(expected)
BackgroundMigrationWorker.jobs.any? do |job| BackgroundMigrationWorker.jobs.any? do |job|
...@@ -26,7 +26,7 @@ RSpec::Matchers.define :be_scheduled_delayed_migration do |delay, *expected| ...@@ -26,7 +26,7 @@ RSpec::Matchers.define :be_scheduled_delayed_migration do |delay, *expected|
end end
RSpec::Matchers.define :be_scheduled_migration do |*expected| RSpec::Matchers.define :be_scheduled_migration do |*expected|
define_method :matches? do |migration| match(notify_expectation_failures: true) do |migration|
expect(migration).to be_background_migration_with_arguments(expected) expect(migration).to be_background_migration_with_arguments(expected)
BackgroundMigrationWorker.jobs.any? do |job| BackgroundMigrationWorker.jobs.any? do |job|
...@@ -41,7 +41,7 @@ RSpec::Matchers.define :be_scheduled_migration do |*expected| ...@@ -41,7 +41,7 @@ RSpec::Matchers.define :be_scheduled_migration do |*expected|
end end
RSpec::Matchers.define :be_scheduled_migration_with_multiple_args do |*expected| RSpec::Matchers.define :be_scheduled_migration_with_multiple_args do |*expected|
define_method :matches? do |migration| match(notify_expectation_failures: true) do |migration|
expect(migration).to be_background_migration_with_arguments(expected) expect(migration).to be_background_migration_with_arguments(expected)
BackgroundMigrationWorker.jobs.any? do |job| BackgroundMigrationWorker.jobs.any? do |job|
......
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