Cycles Render displays wrong UV wrapping in material mode
You can do it with math so it's shown in the 3D view as well if you must:



It seems it gets a bit confusing on exact 0 and 1 on the coordinates as you can see at the edges, but if we extend the last 0.5% or so of the image it seems to work fine: