Closed mirandaconrado closed 1 year ago
The proposal sounds logical, but I am a bit vary of making the Check
signature less obvious. What additional information/behavior do you want to attach?
One big benefit of doing this is that it allows rapid to be more easily used when using a framework like ginkgo. The easiest way to do this in Ginkgo is to use GinkgoT()
to get a struct that isn't exactly a *testing.T
, but implements all of the methods (and some extras) of *testing.T
.
See: https://onsi.github.io/ginkgo/#third-party-integrations https://pkg.go.dev/github.com/onsi/ginkgo/v2#GinkgoT
Does f4756c7c719173865211e7a6e92ec0e8ce78366c look like a proper fix, or is anything still missing?
Just checked it out on a test project, and this solution works perfectly (at least for my purposes using it with Ginkgo). Thanks a ton.
Awesome, thanks!
I've noticed that the concrete type
*testing.T
is used as argument in many places, likerapid.Check
. But in the implementation, it almost immediately callscheckTB
which converts it to the interfacetb
, which is a mirror ofTB
.We would like to be able to pass a
rapid.TB
instead of*testing.T
so that we can wrap the testing structure with additional information and behavior. Would you be opposed to changing the signature of the functions to acceptrapid.TB
instead of*testing.T
? I believe this would be a transparent change to the user given that*testing.T
satisfiesrapid.TB
. We'd be willing to do the work if approved.