diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2018-12-12 16:38:40 +0100 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2018-12-12 16:38:40 +0100 |
commit | 40ad7d5d7a01a6f019ce1c3bb8864b16fc48e9c8 (patch) | |
tree | b6df001f46b76dbe6f48120209f56439e11f6797 /spec | |
parent | 099777a3569208cdadeb88203a19885dbcd5d527 (diff) | |
download | gitlab-ce-40ad7d5d7a01a6f019ce1c3bb8864b16fc48e9c8.tar.gz |
Fix ActiveRecord::Migration deprecations
Extending from ActiveRecord::Migration is deprecated, but was still used
in a bunch of places.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/rubocop/cop/migration/add_timestamps_spec.rb | 6 | ||||
-rw-r--r-- | spec/rubocop/cop/migration/datetime_spec.rb | 8 | ||||
-rw-r--r-- | spec/rubocop/cop/migration/timestamps_spec.rb | 6 | ||||
-rw-r--r-- | spec/support/helpers/fake_migration_classes.rb | 2 |
4 files changed, 11 insertions, 11 deletions
diff --git a/spec/rubocop/cop/migration/add_timestamps_spec.rb b/spec/rubocop/cop/migration/add_timestamps_spec.rb index 3a41c91add2..fae0177d5f5 100644 --- a/spec/rubocop/cop/migration/add_timestamps_spec.rb +++ b/spec/rubocop/cop/migration/add_timestamps_spec.rb @@ -11,7 +11,7 @@ describe RuboCop::Cop::Migration::AddTimestamps do subject(:cop) { described_class.new } let(:migration_with_add_timestamps) do %q( - class Users < ActiveRecord::Migration + class Users < ActiveRecord::Migration[4.2] DOWNTIME = false def change @@ -24,7 +24,7 @@ describe RuboCop::Cop::Migration::AddTimestamps do let(:migration_without_add_timestamps) do %q( - class Users < ActiveRecord::Migration + class Users < ActiveRecord::Migration[4.2] DOWNTIME = false def change @@ -36,7 +36,7 @@ describe RuboCop::Cop::Migration::AddTimestamps do let(:migration_with_add_timestamps_with_timezone) do %q( - class Users < ActiveRecord::Migration + class Users < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/spec/rubocop/cop/migration/datetime_spec.rb b/spec/rubocop/cop/migration/datetime_spec.rb index 9e844325371..f2d9483d8d3 100644 --- a/spec/rubocop/cop/migration/datetime_spec.rb +++ b/spec/rubocop/cop/migration/datetime_spec.rb @@ -12,7 +12,7 @@ describe RuboCop::Cop::Migration::Datetime do let(:migration_with_datetime) do %q( - class Users < ActiveRecord::Migration + class Users < ActiveRecord::Migration[4.2] DOWNTIME = false def change @@ -25,7 +25,7 @@ describe RuboCop::Cop::Migration::Datetime do let(:migration_with_timestamp) do %q( - class Users < ActiveRecord::Migration + class Users < ActiveRecord::Migration[4.2] DOWNTIME = false def change @@ -38,7 +38,7 @@ describe RuboCop::Cop::Migration::Datetime do let(:migration_without_datetime) do %q( - class Users < ActiveRecord::Migration + class Users < ActiveRecord::Migration[4.2] DOWNTIME = false def change @@ -50,7 +50,7 @@ describe RuboCop::Cop::Migration::Datetime do let(:migration_with_datetime_with_timezone) do %q( - class Users < ActiveRecord::Migration + class Users < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/spec/rubocop/cop/migration/timestamps_spec.rb b/spec/rubocop/cop/migration/timestamps_spec.rb index 685bdb21803..1812818692a 100644 --- a/spec/rubocop/cop/migration/timestamps_spec.rb +++ b/spec/rubocop/cop/migration/timestamps_spec.rb @@ -11,7 +11,7 @@ describe RuboCop::Cop::Migration::Timestamps do subject(:cop) { described_class.new } let(:migration_with_timestamps) do %q( - class Users < ActiveRecord::Migration + class Users < ActiveRecord::Migration[4.2] DOWNTIME = false def change @@ -27,7 +27,7 @@ describe RuboCop::Cop::Migration::Timestamps do let(:migration_without_timestamps) do %q( - class Users < ActiveRecord::Migration + class Users < ActiveRecord::Migration[4.2] DOWNTIME = false def change @@ -42,7 +42,7 @@ describe RuboCop::Cop::Migration::Timestamps do let(:migration_with_timestamps_with_timezone) do %q( - class Users < ActiveRecord::Migration + class Users < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/spec/support/helpers/fake_migration_classes.rb b/spec/support/helpers/fake_migration_classes.rb index b0fc8422857..c7766df7a52 100644 --- a/spec/support/helpers/fake_migration_classes.rb +++ b/spec/support/helpers/fake_migration_classes.rb @@ -1,4 +1,4 @@ -class FakeRenameReservedPathMigrationV1 < ActiveRecord::Migration +class FakeRenameReservedPathMigrationV1 < ActiveRecord::Migration[4.2] include Gitlab::Database::RenameReservedPathsMigration::V1 def version |