Skip to content

Ignoring _init for doubles #859

Description

@AfroSpartan

Versions

What versions of Godot do you want to use this feature in?
4.7+

The Feature

I searched to see if there was another issue raised about this but only really found #173 which seems to be talking about partial doubles which makes sense.

Being able to create doubles without them running the _init functions would make things so much more convenient. My previous experience with doubles is mocking, which effectively creates an object which utilises zero original logic. Is it a technical constraint which is making it so the _init function is required because it introduces problems which you use doubles to avoid (injecting dependencies via a singleton in my case, which is causing my tests to require a lot of setup for an object which should have no functionality, especially because the doubles for those dependencies may also need other dependencies)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions