Fix failing tests after fa1c6f70f64d6

Not entirely sure yet this is the best solution. Works just as it did
before, but changing the code so that it can be properly tested is not really
the best solution.

However, now specs are tested as in a development environment (throwing
exceptions instead of rendering error pages), while features are tested as
in a production environment (catching exceptions and rendering error pages).
This seems like a good improvement.