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.

Mocking AR methods causes DB errors in 3.3 #975

@somebody32

Description

@somebody32

Hi, I'm trying to upgrade from 3.2 to 3.3 and getting a lot of db-level errors:

Failure/Error: allow(klass).to receive(:find_by_id).with(id).and_return(return_value)
     ActiveRecord::StatementInvalid:
       Mysql2::Error: Incorrect table name '': SHOW FULL FIELDS FROM ``

But if I set mocks.verify_partial_doubles to false then everything become green again. In 3.2 with activated verify_partial_doubles everything works too

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