This code is effectively duplicated from settings.rb code @zaphod42 and I wrote the other day... we don't necessarily need something quite so fancy for the sake of these tests.