drapergem/draper — pull request #335 by haines (2012-11-12 20:22:06+00:00)
Title: Fix view context

Closes #313 and (hopefully) #316

I have gone down a different route with the integration testing. The problem with the cukes was that they only exercised the app in the test environment. Obviously a lot of the view context problems are environment-specific so I think it's key to run against an actual server request as well.

To this end I have followed the approach of [focused_controller's acceptance tests](https://github.com/jonleighton/focused_controller/blob/master/test/acceptance/app_test.rb), which is to run Capybara against an actual running instance of the app.

To run in test mode, I just wrote specs in the dummy app.

It seems to fail on Rubinius - encoding issues mostly. I'll look into that.

I think some mailer specs would be in order too.

Feedback welcomed :)