As has been already said, whether you have a killer ride or a crappy, easy-ass "workout" isn't about the bike but how much effort you put into it.
I also think that if you are into fitness, then you will be designing different types of workouts for strength, endurance, power, intervals, recovery, etc. If I could only have one bike, I think a road bike would be easier to use to capture the different workout types. But, since I am fortunate enough to be able to have several bikes, I think both the road and mountain bike can be useful. For easy recovery or long steady endurance rides the road bike works better for me. But if I want to do intervals I find that I work harder, and have more fun, by taking the mountain bike out on trails where there are lots of short climbs followed by quick descents.