MikeSchulze / gdUnit3

A Godot Unit Test Framework. Support for gdScript and c# unit testing
MIT License
312 stars 22 forks source link

GD-363: Update Documentation, Is class_name on scripts a hard requirement? #363

Closed MikeSchulze closed 1 year ago

MikeSchulze commented 1 year ago

Discussed in https://github.com/MikeSchulze/gdUnit3/discussions/361

Originally posted by **maximinus** December 31, 2022 Started testing GDUnit this week and it took me an age to get the first test running, because I could not find a way to reference the object I was testing. After really carefully looking at the code images in the docs, I finally discovered that I had to add class_name to the gdscript node I was testing, and then I could reference that object in the test. I think this needs to be made a bit clearer in the tutorial because it nearly made me delete the addon. Secondly, is this a hard requirement? I'm not necessarily against adding class_name, however it's something I've typically not done with my gdscript code before.
MikeSchulze commented 1 year ago

https://github.com/MikeSchulze/gdUnit3/commit/daca81c39bdd216e2c46a1fef1bcc8af3a4f25ac