add ability to write environment properties

These two (or three, if counting previous) tests can be united via parametrization to reduce copypasta.
Just derive ``environment`` and ``expected_content`` parameters.