rspec / rspec/rspec-activemodel-mocks

Instructions not explicit

Open
#12 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
119
Forks
31
Avg merge
5h 47m
Merged PRs (30d)
2

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."

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the rspec-rails installation documentation, this gem's documentation, and the linked upgrade page about extracting stub_model. Confirm where the installation requirement for rspec-activemodel-rails should be stated. Done means users are explicitly told to install this gem alongside rspec-rails.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.