I'm not sure what you're trying to accomplish here, since that command would check if a dropped piece of dirt is in the same block as a mob spawner, which is not possible. If you're trying to check if it's on top of one then the command
Big Sister Minecraft Server! Apply for whitelist here:
Thank you, Minecraft Forum, for providing a place for us all to gather together and discuss this great game with each other. The community built up around this place was wonderful, and I will miss logging in every day to see the latest posts on my favorite topics. If it wasn't for this site, I wouldn't be with the wonderful group I am with today nor would I have learned so much about the workings of the game and redstone. We will all miss you, and I don't think there will ever be a site quite like this one.