Does spin class prepare you for a long bike ride?
Regular aerobic exercise is definitely of value for preparing for a big ride. Spin is a good preparation in conjunction with some outdoor rides, but it is not a substitute for riding your bike on the road. 

The feel of the bike, the balance, the momentum, and the environmental and traffic factors will have an effect on your fitness as well, some of which may be purely mental.

If time is limited, try spin 2-3 days a week, and build up your endurance, but also do at least one longer outdoor ride each week. If you're riding 50 miles, you need to plan to be on the bike for 3-5 hours when you do the actual ride. 

Build up to where you can handle 3 hours on the bike easily, and you'll do fine.