Upgrading Rails is normally a simple task, especially if the difference between the versions is not very large. But in the case of 4.1 to 4.2 upgrade of an application (or a library) using RSpec 2, it can get messy, because RSpec 2 is not fully compatible with Rails 4.2. So in order to upgrade Rails, you have to upgrade RSpec first. Here how we did that:
In order to upgrade to RSpec 3 we first upgrade to RSpec 2.99.0
, run the specs to see the deprecations,
fix the deprecations and then upgrade to 3.1.0
.
- First remove all RSpec gems except
rspec-rails
(all therspec-*
gems). - Then update
rspec-rails
gem to version2.99.0
.