Butch Wesley

Results 233 comments of Butch Wesley

Sorry, I forgot another condition is that all `_init` params must have defaults. Changing `_init` to this made the test pass: ``` func _init(foo=1): ```

Unfortunately, Godot doesn't provide any metadata about default values in user defined functions, but you can [Stub Method Parameter Defaults](https://github.com/bitwes/Gut/wiki/Stubbing#stubbing-method-paramter-defaults). In this case you would do the following: ``` gdscript...

It's possible. You can try the workarounds below to see if it makes the test consistent. I looked back at the code to try and figure out what "complex setups"...

That's probably a WAY better approach.

I also could not replicate the issue using the following. What are you doubling? ``` gdscript extends GutTest func test_stub_image(): var double_img = double(Image).new() stub(double_img, 'get_pixel').to_return(Color(1, 0, 0)) assert_eq(double_img.get_pixel(1, 2),...

It's been....awhile...I think I see the issue: You are stubbing the return in `before_all`, which will only work on the first test. All stubs are cleared between tests to make...

You would like to automatically create `double` and `partial_double` scripts for all children (recursively) in a scene? This might be possible. It would probably have to set the script on...

This could probably use some clarification in the docs.