From 742fac55b953f19879c05760824529a5e6958741 Mon Sep 17 00:00:00 2001 From: Carolyn Date: Mon, 17 Mar 2025 22:29:57 +0000 Subject: [PATCH] end unclosed Timecop freeze causing flaky tests --- spec/models/lettings_log_derived_fields_spec.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/models/lettings_log_derived_fields_spec.rb b/spec/models/lettings_log_derived_fields_spec.rb index e4edb194e..46a09d7eb 100644 --- a/spec/models/lettings_log_derived_fields_spec.rb +++ b/spec/models/lettings_log_derived_fields_spec.rb @@ -1194,6 +1194,10 @@ RSpec.describe LettingsLog, type: :model do Timecop.freeze(Time.zone.local(2025, 5, 5)) end + after do + Timecop.return + end + it "derives the most recent let type as London Living Rent basis if it is a renewal" do log.assign_attributes(renewal: 1, rent_type:)