Handle when config.enabled_environments hasn't been set

Thanks to @joshwayne for pointing this out. This builds on his changes in #46 and rejigs the tests to cover this case.