From df9b61f38f1eeb750da2c95a503563783b4bc04f Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Wed, 29 Jan 2020 09:19:43 +0900 Subject: [PATCH] Fix CI failure on Ruby master Ref https://github.com/ruby/ruby/pull/2857. --- .../cases/migration/command_recorder_test.rb | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/activerecord/test/cases/migration/command_recorder_test.rb b/activerecord/test/cases/migration/command_recorder_test.rb index 42edb2cd5d..03b641df60 100644 --- a/activerecord/test/cases/migration/command_recorder_test.rb +++ b/activerecord/test/cases/migration/command_recorder_test.rb @@ -98,10 +98,18 @@ module ActiveRecord t.rename :kind, :cultivar end end - assert_equal [ - [:rename_column, [:fruits, :cultivar, :kind]], - [:remove_column, [:fruits, :name, :string, {}], nil], - ], @recorder.commands + + if RUBY_VERSION >= "2.8" + assert_equal [ + [:rename_column, [:fruits, :cultivar, :kind]], + [:remove_column, [:fruits, :name, :string], nil], + ], @recorder.commands + else + assert_equal [ + [:rename_column, [:fruits, :cultivar, :kind]], + [:remove_column, [:fruits, :name, :string, {}], nil], + ], @recorder.commands + end assert_raises(ActiveRecord::IrreversibleMigration) do @recorder.revert do