Rspec view undefined method stub_model

What is your rspec-rails version?

According to the Changelog and this Commit mock_model and stub_model are removed since version 3.0.0 of rspec-rails.

rspec mocks are externalized in an another gem rspec-activemodel-mocks . You should include it in your Gemfile and try it.

Hope it helps


this should be a comment to ahnbizcad's comment, but I lack the reputation to do it properly.

It should be fixed by adding

require 'rspec/active_model/mocks'

to spec_helper.rb