Code and text don't appear at the same time.
It's a bit odd, and Code Golf has a better reason to use code in spoiler text than any site on the SE network :)
EDIT: It appears this is not the first problem with spoiler text and code.
That problem was fixed in April 2014.
I also found spoiler transitions are strange here which describes the same problem with transitions, though it was (incorrectly) closed as a duplicate of another question.