-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Description of issue
When using the simulate function the tests can pass but multiple errors will generate inside of the console window. This is likely tied to the fact that the built-in function move_and_slide_with_snap is being used inside our _physics_process. An attempted solution was to make the object being tested, the player controller, be a partial double and to stub the move_and_slide_with_snap function so that it returns a unit vector. This presented a new issue however being that the move_and_slide_with_snap expects to assign a variable with its return value, which in this case is the velocity being tested. This meant that the velocity variable being asserted was always equal to the unit vector instead of the expected values. It would be useful if a stubbed function could be set to return the passed in value.