ooooooh snap - DS is just the same.
Depends on his mood and I think if he gets a reaction from me, so I try and snack at the same time as he eats or busy myself a bit and just let him get on with it. Its so annoying but now I am ignoring it is happening less often.
DS if you offered him any sort of pudding he had never seen before would try it, but offer a veg he hasn't seen before and he just knows.
I have already taken to cooking veg in sauces and blending up sauce so he doesn't know its packed full of goodness - so he ate chicken curry and rice but the curry sauce was super charged with veg. Took him forever to like chicken too but now he loves it, my mum had to hide veg for years its not worth mega battles I think.
I just offer if he tries I praise him and then ignore when he spits.
Its tough though - hate the mess all the spitting makes.