From the point of view of this situation - what happens during a transient - it doesn't matter whether we think of it as a voltage source or a capacitor, what really matters is its series impedance.
For a brief time period, both battery and capacitor can be considered as a Thévenin voltage source in series with an amount of inductance and resistance.
For a brief time period, both battery and capacitor can be considered as a Thévenin voltage source in series with an amount of inductance and resistance.