diff --git a/spec/lib/tasks/send_missing_addresses_csv_spec.rb b/spec/lib/tasks/send_missing_addresses_csv_spec.rb index 3f2ab8529..640faf374 100644 --- a/spec/lib/tasks/send_missing_addresses_csv_spec.rb +++ b/spec/lib/tasks/send_missing_addresses_csv_spec.rb @@ -2,16 +2,16 @@ require "rails_helper" require "rake" RSpec.describe "correct_addresses" do + around do |example| + Timecop.freeze(Time.zone.local(2023, 10, 10)) do + Singleton.__init__(FormHandler) + example.run + end + end + describe ":send_missing_addresses_lettings_csv", type: :task do subject(:task) { Rake::Task["correct_addresses:send_missing_addresses_lettings_csv"] } - around do |example| - Timecop.freeze(Time.zone.local(2023, 10, 10)) do - Singleton.__init__(FormHandler) - example.run - end - end - before do organisation.users.destroy_all Rake.application.rake_require("tasks/send_missing_addresses_csv")