It depends on your goals. Yes, spinning classes do contribute to both outdoor cycling and overall fitness. If your goal is to be a world class cyclist, spinning and weekends aren't going to cut it. You'll need to ride several hours each day as a minimum for that, along with a trainer, etc. If on the other hand your goal is to do a 50 or 75 mile ride, then yes, it's possible. Combine spinning 2x a week with 3 outdoor rides a week and it can be done. If you take a spin class on monday or tuesday, ride outside on wednesday, spin thursday or friday and ride outside sat and sun you should be able to handle a ride like 50-75 miles by the middle of july. This is assuming of course that you have a reasonable fitness level right now.
My wife and I, along with my sister trained for and did the Shoreline bike Tour that way. It goes up the shorline of lake Michigan in seven days. The ride was 45-70 miles a day. My wife and sister had never ridden seriously before. This was a totally doable thing for them. While they were sore some days, it wasn't anything that made them want to stop. They trained for it by riding 4 times a week. During the week it was 10-15 miles a night. On the weekends we worked up from 25 miles early in the summer, to doing 50 miles in one day on july 4th. The 7 day ride was on july 31th-august 7th. They loved it! Granted, we were NOT going very fast, I think our average per day was 10-13 miles per hour most days. That's not too bad though, it's a relaxing ride through awesome country. While I would have loved pushing 20 mph with a pack, this was also very enjoyable. by the way, we did it on mountain bikes.
So yes, depending on your goal, that is a good start to training.
--Bob