-
Notifications
You must be signed in to change notification settings - Fork 12
Add some tests using buttercup #89
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
Conversation
|
Hi @zonuexe I've written a pair of simple tests with buttercup. Travis would be nice to have that automated. Would it be ok for you to give travis access to this repository ? |
|
@kermorgant Thank you and LGTM.
👍 |
|
@zonuexe fine. Then I think you need to setup Travis for emacs-php/phpactor.el as I don't seem to have permissions to do that. |
|
@kermorgant |
|
@zonuexe thanks ! |
|
|
|
Not tsure what's happening while testing if phpactor is installed correctly. Is there some async code issue ? |
2fc3ec3 to
282bd86
Compare
tests/e2e/test-sanity.el
Outdated
| (expect (spy-calls-args-for 'composer 0) | ||
| :to-equal | ||
| '(nil "install" "--no-dev")) | ||
| ;; (expect return-value :to-be "*compilation*") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this test fails, couldn't figure out why
tests/e2e/test-sanity.el
Outdated
| ;; (display-warning 'buttercup (format "Buffer content : %s" (buffer-string* "*Messages*"))) | ||
| ;; (dolist (bufname (buffer-list)) | ||
| ;; ;; (display-warning 'buttercup (format "found buffer : %s" bufname) | ||
| ;; (display-warning 'buttercup (format "buffer content : %s %s" bufname (buffer-string* bufname))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was no compilation buffer created, and the "composer install" command seemed not to have been run at all (no vendor folder was created)
|
Hi @zonuexe I've started using buttercup and cask but it's quite tricky to figure out what's happening behind the scenes once the test is running. I would have liked to test the installation of phpactor from phpactor.el but for some unknown reason, the invocation of As you can see in .travis.yml, we could get around by running composer install directly, but that's not great. Do you have any idea about that ? EDIT : I found using 'run-buttercup-at-point' within emacs to be really helpful, as the result seems very close to what happens when running buttercup from cask. After recent experimentation, the issue comes from "composer install" being run async. I need to figure out a way to wait for the end of it before running the expect statement. |
add travis conf in order to run buttercup tests test phpactor installation test phpactor-get-working-dir (remove unused phpactor-working-dir variable) test phpactor--lisp-directory and add a fix for it
|
Hi @zonuexe I'm going to merge that in develop, but don't hesitate to add comments if you see something deserving a change. |
first attempt at using buttercup for some basic tests