-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example how to update state #10716
Example how to update state #10716
Conversation
This is a neat idea. Can you spin out an issue for it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM and the AppMock
works as a solution for now until #3786 is resolved and hopefully removes the need. (Tho, this does have conflicts that needs to be resolved before merging).
@stepancheg can you please resolve merge conflicts? |
This seems to not be importing necessary stuff; doc tests are failing. |
Closing as adopted. |
Pull request was closed
# Objective adopted from #10716 adds example for updating state --------- Co-authored-by: Stepan Koltsov <[email protected]> Co-authored-by: Alice Cecile <[email protected]>
I'm adding
AppMock
again. This is not very nice looking code.I'm thinking about this alternative: create a crate like
bevy_mocks
, which could be added as dev-dependency to most crates. AFAIU dev-dependencies are available in doctests.bevy_mocks
would contain interfaces of most frequently utilities likeApp
orInput<KeyCode>
and dummy implementations. That would be sufficient to write compile-only tests which would look concise in sources and illustrative in published rustdocs.