Of course — it's a surprise inspection, after all.

Literal

Naturally [feminine-よ], surprise-attack [copula-なんだもの].

当然よ ('of course,' with feminine よ) is the assertion. 抜き打ち (ぬきうち, 'surprise attack, spot check') — originally a sword-drawing term — is used here for a surprise inspection or test. なんだもの uses the feminine explanatory もの for 'because, after all.' The speaker is matter-of-factly explaining why something unexpected happened.