The errors were I think caused by a change in the separation of the tests so database state was leaking between them causing failures but I haven't investigated deeply.
In these sorts of situations I never know whether it is best to 'bundle update' everything and have less information about the source of any problems or just to 'bundle update rails' and not receive the compatibility fixes straight away. How do others do this?
[Edited to add detailed version information and last paragraph].
Generally, I do this:
1) update everything, run `rake rails:update`, and run the tests. Hope this works. If not, figure out if the error is mine or a gem's.
2) If it's a gem's, try to lock it to the exact version I was using and repeat 1).
3) If that doesn't work due to version issues, investigate if the gem has some sort of preview support for rails 4.
4) if not, either send a pull request or an issue.
This was the smoothest major upgrade yet, with very helpful deprecation notices. Thanks for all the hard work.