What happens when all your cards (the whole deck) are in play?
The rule is always that you do as much as you can of the card, in order.

So, if you play a Smithy, you would draw those two cards.

A case that is more illustrative of how the process works is Lookout. Lookout reads: "+1 Action, Look at the top 3 cards of your deck. Trash one of them. Discard one of them. Put the other one on top of your deck." If you only had two cards remaining in your deck, you would do as much of the card as you can, in order:


+1 Action; no problem.
Look at the top 3 cards of your deck. You only have two, so that's what you do.
Trash one of them. You can do this, so you must trash one of those two cards.
Discard one of them. You can also do this, so you must do it.
Put the other one on top of your deck. You can't do this because there is no other one, since you only had two to start with. So, you skip this step.