alphagov/plek — pull request #7 by alext (2013-01-15 10:53:34+00:00)
Title: Allow setting a default parent domain

Ability to set a default parent domain at class level. This will allow
application test setup to specify a default domain, and thereby decouple
the tests from the environment.

For example you could add the following to `test_helper.rb`:

```ruby
require 'plek'
Plek.default_parent_domain = 'dev.gov.uk'
```

Note: due to the way Slimmer is currently implemented, this needs to be before the app is loaded (before `config/environment.rb` is required). I have an idea for how to modify Slimmer to delay the Plek lookup until it's needed and thereby avoid this problem.