(PUP-3268) Use explicit environment references in specs
Specs which relied on legacy environment loaders implicitly generating
environments for unknown environment names need to be updated to use
explicitly created environments. This is because the directory environment
loaders will instead raise environment not found errors. Since legacy
environments are going to be removed, this change needs to happen before
we add a default to the environmentpath setting and remove the legacy
code.
These specs have been adjusted to either directly supply a created
environment to the methods under test, or to set up a static environment
loader providing some explicitly set of environment(s) to the tests.
I also made some stylistic changes in specs that I was touching to avoid
mocking, replace use of instance variables with let statements, and to
prefer expect over should.