Stalin was taken completely by surprise by Hitler's attack. The Russians definitely hadn't been preparing for an inevitable war with Germany. (Though you may argue that they should have known such a war was coming their way.) Nor were they very keen on it, as the German war machine had just the previous year basically conquered all of Western Europe and Scandinavia without meeting anything ressembling competent opposition.
There is actually quite a bit of controversy about Stalin's intentions (certainly in the long run) but the above is, I believe, more or less generally accepted in the West today.
http://en.wikipedia.org/wiki/Soviet_offensive_plans_controversy