Expectation driven SPI test helper (RFC)
This is my WAG at an SPI test helper after I wrote #738
It's based on ordered Tx expecations. I also had to make a partial Pin interface as input to my MAX6675, I'm not sure how to finish that out in a meaningful way without machine. I'm not sure if the chip select pin should be part of the test helper or an independent concern.
I'll leave this here as a discussion point, but happy to adjust or expand this as well as try my hand and testing some of the other SPI based drivers to get a feel for the API here.
Very cool, I will take a look!
I also had to make a partial Pin interface
We were needing to do something about that probably, however since some drivers do very specific things with Pin we will have to see how far we can take that.
I'm not sure if the chip select pin should be part of the test helper or an independent concern.
A very good question. Since we do that CS "manually" in the drivers, it probably needs to be somehow separated.
I added another, very basic expectation based Pin implementation as well. Works for CS at least.
Using something like testify/mock and mockery might be a better direction for these.