lotus/lotus — pull request #61 by twe4ked (2014-07-31 07:38:37+00:00)
Title: WIP: Allow customising error pages

I long long time ago I said I'd work on this. Ended up being quite a bit different than I imagined and I had to ask quite a bit of poor @jodosha. I haven't had a chance yet to finish the tests (unpushed) but I thought I had better (finally) create a PR.

The issue I was running into with the tests was changing the working directory. It seems the working directory needs to be changed before the application is loaded or it won't be set to the correct location.

``` ruby
describe 'Error page test' do
include Rack::Test::Methods

before do
@current_dir = Dir.pwd
Dir.chdir FIXTURES_ROOT.join('one_file')
require 'fixtures/one_file/application' # We have to require this after the `chdir`
@app = OneFile::Application.new
end
```

I was using a modified version of the `one_file` application. Any thoughts on the best way to handle this?