parroty / excheck

Property-based testing library for Elixir (QuickCheck style).
MIT License
316 stars 26 forks source link

Using ExCheck with Espec #29

Open brendanzab opened 8 years ago

brendanzab commented 8 years ago

So I see that ExCheck is pretty coupled to ExUnit. Is there any way to easily adapt it to work easily with Espec? I'm guessing I would have to make my own implementation of ExUnit.__using__? And my own Espec.Statement module? Anything else I'm missing?

luc-tielen commented 8 years ago

Not too familiar with espec but most likely you would have to create counterparts for the various macros ExCheck uses that generate ExUnit-related code. In the most generic using statement (excheck.ex), you could provide an argument indicating which testing framework you want to use underneath (default ExUnit for backwards compatibility). You could then use this argument to switch between which macro you want to use to generate code.

It's been some time since you logged this issue, but better late than never, right? :)