+
+ def with_settings(settings)
+ saved_settings = Settings.to_hash.slice(*settings.keys)
+
+ Settings.merge!(settings)
+
+ yield
+ ensure
+ Settings.merge!(saved_settings)
+ end
+
+ def with_user_account_deletion_delay(value, &block)
+ freeze_time
+
+ with_settings(:user_account_deletion_delay => value, &block)
+ ensure
+ unfreeze_time
+ end