-
-
Notifications
You must be signed in to change notification settings - Fork 34
Description
"If you are using rspec-rails and have followed the installation instructions there, you're all set to use stub_model and mock_model."
It seems following those instructions in rpsec-rails does not enable these two methods. It seems you need to explicitly include this gem. I've been getting undefined method 'mock_model' in my test reports until I included this gem in my gemfile.
But nowhere in rspec-rails documentation, nor in this gem's documentation, nor here https://www.relishapp.com/rspec/rspec-rails/docs/upgrade#extract-stub-model does it explicitly say to include this gem. The hazy, somewhat misleading, and implicit documentation should be changed in favor of letting the user know explicitly that this gem must be manually included.
"gem install 'rspec-activemodel-rails'"
or
"You need to install this gem as well as rspec-rails."