test: properly verify dev server exec #379
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Currently some of the tests are not being run as their assertion code just isn't being called - from what I can tell, I don't think RSpec has ever supported passing a block to
receive
in a way that gets executed (except maybe if the mocked method actually expects a block but I've not tested that).Pull Request checklist
Remove this line after checking all the items here. If the item does not apply to the PR, both check it out and wrap it by
~
.Update documentationUpdate CHANGELOG fileOther Information
This does reveal some interesting behaviour with the
https
logic that is probably worth addressing:https
is being used is based on checking theprotocol
but there's anhttps?
method too - it looks like this generally just has not been deprecated properly--https
is provided buthttps
isn't enabled but it doesn't do the inverse check; it also seems like the runner could automatically provide--https
and so just encourage settingserver: "https"
in the config?--https
and co, so there might be some valid reason for why Shakapacker requires the user to provide bothexit!
which means those branches can't be easily tested - ideally it would be best to throw an error that could be caught, but even just switching toexit
will make it easier to test (as under the hood that throwsSystemExit
which you can expect to receive); I would argue that's better anyway for a library because there might be cleanup hooks registered downstream that should be called