Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

'not defined constant' errors when using instance_double #842

@floydj

Description

@floydj

I have the following:

let(:project) { instance_double 'Project' }

But when I run specs that access this double, I get Project is not a defined constant. Perhaps you misspelt it?

I have the following in my spec_helper.rb file:

config.mock_with :rspec do |mocks|
  mocks.verify_doubled_constant_names = true
end

I have a Project class with:

class Project < ActiveRecord::Base

What am I missing here?

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