Add tests and then a fix for platforms in the new dependencies API support

My fix extends helpers.spec_for by adding a "platform" argument. I had to give that argument a default value to avoid needing to change all calls to it. What I don't know is if those other calls really should be changed to include platform.