My first thought as I was reading your post was "typical male during breeding season." That is very normal for a male to go off feed till the breeding season is over, regardless if a female corn is around. One of those pre-programed things in snakes. But, if he tried to eat and spit it out, then maybe you should visit a vet and make sure that nothing is amiss. I have had a snake do that a couple times but it was because I was watching them and moved and it startled them and they spit it out.
NOW, it still could be he is lacking interest enough to eat/finish a meal with his hormones going nuts at this time of year, but this may be one time that a trip to the vet would be a good idea.
Is the snake acting any different otherwise? Have you looked in the snake's mouth to make sure there is no mouth rot going on or any foreign debree lodged in the mouth? Also, hold the snake close to your ear and listen for any wheezing sounds, signs of a URI. These are a few things you could do yourself to rule out possible problems.
Otherwise, if things still don't look "right" to you, then, as I said, the vet is the best thing to do.
Best of luck and I hope it is only the male hormones gone amuck.