Closed eernstg closed 2 months ago
Now I wonder how did you find it? :)
Documentation seems to be broken by https://github.com/dart-lang/mockito/commit/1dcd8225e9014b17ba256d7fa1d056f339189630, interestingly the executable version in example/example.dart doesn't have this line.
Out of set expectations the last matching one wins https://github.com/dart-lang/mockito/blob/3ef744f8749864f2a036eba60c4203cc8f638949/lib/src/mock.dart#L183, and it was like that since forever. I'll update the README to put that line above more specific expectation, thanks for reporting!
Now I wonder how did you find it? :)
Just tried it. :grinning:
I don't know if there's anything deep in this, but I just noted that the following example from README.md in this section fails:
The test succeeds if this line is moved up such that it occurs before
Looks like that might just be working exactly as intended, but in that case the README.md file should probably be adjusted. Or perhaps I just misread the example?