Skip to content

allow_any_instance_of(Object).to receive(:sleep) failure #123

@rdh

Description

@rdh

After adding buildkite-test_collector to our Gemfile, specs that stub sleep in this way...

allow_any_instance_of(Object).to receive(:sleep)

... have begun failing with this error message...

Failure/Error: allow_any_instance_of(Object).to receive(:sleep)
       Using `any_instance` to stub a method (sleep) that has been defined on a prepended module (Buildkite::TestCollector::Object::CustomObjectSleep) is not supported.

... under rspec (3.10.0) and rspec-rails (5.0.0)

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