How to match a sprite shape to a spline

I am using the unity splines to make a rail road in 2d
I have a sprite shape for making the sprite of the railroad how do I make the sprite shape spline match the spline I already have