311 rspec-rails 2.14 compatibility fork for Rails 3.2 LTS

Updated . Posted . Visible to the public.

With Rails 3.2 LTS your RSpec 2 controller specs might fail with an error like this:

NoMethodError:
  undefined method `[]' for nil:NilClass

Fix

To fix this, use our compatibility fork of rspec-rails 2.14 Show archive.org snapshot .

You can switch to the fork by updating your Gemfile:

gem 'rspec-rails', :git => 'https://github.com/makandra/rspec-rails.git', :branch => '2-14-lts'

Now run bundle update rspec-rails.

Profile picture of Henning Koch
Henning Koch
Last edit
Michael Leimstädtner
License
Source code in this card is licensed under the MIT License.
Posted by Henning Koch to Rails LTS documentation (2018-04-27 09:09)