Skip to content

Instructions not explicit #12

@ahnbizcad

Description

@ahnbizcad

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions