Refactor lightweight resource/provider loading in specs.