At least five years, hopefully more. 
As an example, I've got a Mid 2007 iMac at home. It is the base model 2.0 GHz Core 2 Duo, ATI Radeon HD 2400 XT (128MB) and it came with 2GB of RAM and a 250GB HDD. I've since upped it to 4GB of RAM and a 128GB SSD. This iMac shipped with OS X 10.4 Tiger, and it has been upgraded through every release of OS X since and is currently running Yosemite. 
Could it be smoother? Yes, the GPU is on the older side of things but as far as running daily applications like Chrome, Safari, iTunes, Aperture, Mail, Office, and even some iMovie it works just fine! This computer is coming up on 8 years old come August and it's still meeting my parents needs just fine.
So I'd give it at least 5 years. The 2007 MBP and (late) 2008 MacBook are also still supported and getting updates so if that's any indication this new guy should last quite a while. 
As far as smoothly goes, that's highly subjective. Some people have frame drops with their 2015 rMBPs and they're new and shipping. From what I can tell with our iMac it was perfectly smooth up until Yosemite, and that's only because of the use of translucency all over the OS. Our similarly equipped 2008 model does just fine with a slightly better GPU.