-
Notifications
You must be signed in to change notification settings - Fork 374
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
mtl-style class for YesodExample #1813
Comments
One downside to polymorphic test helpers is that it can make inference worse - you may have to specify type annotations or aliases to get This seems like a useful library - |
Fair concern. Our own test suite required very little extra type annotation, but I suppose this change would break the examples in the yesod-test readme. I have some other things I'd like to contribute to |
That works for me! I'm curious what else you're intending to do - I have a rewrite/new library planned with |
Not anything too exciting, I think. We've just been collecting an assortment of convenient assertions that might be nice to share. |
Rather than expanding Your utilities in |
Yeah, I'd be happy to introduce that. The generalization from |
Yesod testing assumes that you're going to write your tests in the
YesodExample
context. If you're working in a different monad (e.g.YesodExample
augmented with aReaderT
orStateT
layer that helps manage test fixture data), you're constantly having to liftYesodExample
actions. I'd like to propose adding the following polymorphic lifting function:Many of the utilities in the
Yesod.Test
module could then be generalized to aMonadYesodExample
constraint.I've already done this internally. If there is interest from maintainers, I'll start work on a PR to upstream it.
The text was updated successfully, but these errors were encountered: