Open christopinka opened 1 year ago
IIRC, there isn't and shouldn't be a way. You need a system to run the actors anyway.
Also, note that there has been no development on riker since 2021.
Understood. How do you recommend unit testing behavior in receive function? Thanks
Do you know of any plans to handoff the project to other owners?
There were plans to create an organization or something similar, but it never became reality. The original author disappeared multiple times already, without a leaving a clue on what is going on.
You are probably better of using a different framework like stakker or coerce.
As to your original question: You can just set up a system and spawn the actor you want to test and send appropriate messages to it. If the actor needs other actors, you can pass the actor refs to an actor who handles the same messages as the real one, but provides mock behavior for that test.
Is there a way to get ActorRefs for unit testing without the system context?
actor_cell.rs
isn't a public mod?Does it make sense to be able to use ExtendedCell::new() in unit tests?