Patch for integration testing complex forms

Hi.

When integration testing complex forms, that is forms that updates more than one model (through as has_many), and the submodel fields contains file uploads. The mock request generated is incorrect.

I have made a ticket (2576) describing the problem. Supplied a patch that contains tests that demonstrates the problems and contains a fix for the problem. See #2576 integration test fails on complex forms updating multiple models - Ruby on Rails - rails

Hope this will be committed to rails master branch.

Jarl