If you have a residential Fridge: it depends...
(You might have other options...)
If you have an absorption Fridge: it's actually not necessary... but perfectly okay.
(Back to the residential Fridge...)
Since they run on 120 volt power: the generator is certainly a good option...
But if your Fridge is wired to run from your inverter: it might run on battery power also.
(might run: not will run!)