  Context. Most of our knowledge on the stellar component of galaxies is based
on the analysis of distant systems and comes from integrated light data. It is
important to test whether the results of the star formation histories (SFH)
obtained with standard full-spectrum fitting methods are in agreement with
those obtained through colour-magnitude diagram (CMD) fitting (usually
considered the most reliable approach). Aims. We compare SFHs recovered from
both techniques in Leo~A, a Local Group dwarf galaxy whose majority of stars
formed during the last 8 Gyrs. This complements our previous findings in a
field in the Large Magellanic Cloud bar, where star formation has been on-going
since early epochs though at varying rates. Methods. We have used GTC/OSIRIS in
long-slit mode to obtain a high-quality integrated light spectrum by scanning a
selected region within Leo~A, for which a CMD reaching the old main mequence
turn-off (oMSTO) is available from HST. We compared the SFH obtained from the
two datasets, using state-of-art methods of integrated light ({\tt STECKMAP})
and resolved stellar population analysis. In the case of the CMD, we computed
the SFH both from a deep CMD (observed with HST/ACS), and from a shallower one
(archival data from HST/WFPC2). Results. The agreement between the SFHs
recovered from the oMSTO CMD and from full spectrum fitting is remarkable,
particularly regarding the time evolution of the star formation rate. The
overall extremely low metallicity of Leo~A is recovered up to the last 2 Gyrs,
when some discrepancies appear. A relatively high metallicity found for the
youngest stars from the integrated data is a recurring feature that might
indicate that the current models or synthesis codes should be revised, but that
can be significantly mitigated using a more restrictive metallicity range...
[Abridged]
