I have been helping with moving a fairly big legacy Rails code base from 2.3.x to 3.x, and one of the issues I had was to use minitest with rails controller specs. Initially to make this work with 2.3.x we were doing something like this in spec_helper.rb:
1 2 3 4 5 6 7 8 | |
However, ActionController::TestProcess has been removed in Rails 3.x, and it’s no longer so simple to get all the needed spec methods. After quite a bit of digging around, found the correct way to do this:
1 2 3 4 5 6 7 8 9 | |
Hopefully this saves others a bit of time. One caveat though, I have tested this only on Rails 3.0.x, so no idea if this works with Rails 3.1.x. If it doesn’t, you could also look at minitest-rails.