-
Notifications
You must be signed in to change notification settings - Fork 45
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
Multiple before-all? #75
Comments
Hm. Tricky. Conceptually, I mean. Do you know of something like this in Jasmine or RSpec? I think it would basically boil down to a macro as you describe, though, so I guess it's messy either way :-) Maybe just put the actual test code into a function and call it from multiple describe/it blocks? |
I don't know anything about Jasmine or RSpec, sorry. :) The tests in question are here, if it helps: https://github.com/alphapapa/helm-org-rifle/blob/master/test/helm-org-rifle-test.el The It would be neat if there were something like: (before-all-multi
'((progn
;; First run
)
(progn
;; Second run
))) And the whole suite would be run for each form. Thanks. |
I'd probably just define a helper function to run the test and do different setup/teardown code for each. Having lots of boiler plate code in the test can indicate a somewhat problematic API, but I do not know your project so this is nothing I can back with evidence :-D |
Would it be possible to run a
describe
suite multiple times with differentbefore-all
s (and I guessafter-all
s too)? I need to run a suite multiple times with a slightly differentbefore-all
(finding a file normally and literally), and I'm not sure how to do this without duplicating the entire suite.It would be nice to be able to do this similarly to how Travis can run multiple times with different Emacs versions with multiple values of the same variable in
env
.I guess I could make a macro to wrap
describe
, calling it multiple times with a differentbefore-all
each time, but that seems...uh...messy... :)Thanks.
The text was updated successfully, but these errors were encountered: