-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the ability to set up variables on the describe block #44
Comments
Could this be a variant of #43, if we separate |
I guess it depends on how it's implemented. If |
Yes. I'd like for describe "some state" $ before readRef $ before readArray $ do
it "should have this property" $ \ref array -> do
...
it "should have that property" $ \ref array -> do
... Not sure the current design makes that very simple to implement, but I think it would be very nice to have. :) |
To me, hspec's hooks API looks like a good idea to mirror to achieve this: https://hackage.haskell.org/package/hspec-2.4.3/docs/Test-Hspec.html#t:ActionWith. I don't think it would be terribly hard to make this happen. I wish I had the time to tinker with this, looks like a fun task |
@felixSchl Thanks, will have a look at it. I hope I can find some time, too. It does not look very bright in the coming week. :/ |
Still, I have no time to work on this. Anyone who wants to give it a shot? |
If you have some state you want to test in multiple
it
blocks, instead of having to instantiate it multiple times, it would be nice to be able to do it once in thedescribe
block for those specs. Ie:The text was updated successfully, but these errors were encountered: