From 82765baeaeac9f202a83dab808dc0d1143c0ffc1 Mon Sep 17 00:00:00 2001 From: Matheus Sales Date: Tue, 19 Dec 2023 16:42:59 -0300 Subject: [PATCH] fix: Adjust flakey spec on `ValidateAbsenceOfMatcher` --- spec/support/unit/change_value.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec/support/unit/change_value.rb b/spec/support/unit/change_value.rb index 72475a955..f54354b7f 100644 --- a/spec/support/unit/change_value.rb +++ b/spec/support/unit/change_value.rb @@ -41,6 +41,7 @@ def next_value value + [value.first.class.new] elsif value.respond_to?(:next) return value.to_date + 1.day if date_column? + return SecureRandom.uuid if uuid_column? value.next else @@ -115,5 +116,9 @@ def dummy_value_for_column def date_column? [:date, :datetime, :time, :timestamp].include?(column_type) end + + def uuid_column? + column_type == :uuid + end end end