I am trying to define some acceptance tests on ASP.NET MVC controllers. My tests run in the context of a separate testing application as you'd probably expect. My MVC controllers need to run in the context of the application - i.e. over top of the web.config defined for the MVC project. The project is using Castle Windsor to instantiate the dependencies in the live project.
I'd like my tests to instantiate the MVC controllers directly rather than running as an HTTP client.
We've done this in the past by copying the web.config from the web project over to the test project, but over time this has become a maintenance nightmare having to track through chains of dependencies every time a change is made.
Is there a more suitable approach to testing this stack without
- Copying the web config which causes a maintenance nightmare
- Having our acceptance tests run in a client/server fashion over http