Skip to content
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

Fix plugin auto-loading by adding a --guard flag #141

Merged
merged 1 commit into from
Jul 29, 2016

Conversation

tmichel
Copy link

@tmichel tmichel commented Jul 29, 2016

This is a fix for #137.

Minitest loads all plugins regardless of context and this caused guard notifiers to fire even when tests were run outside of guard. To fix this we pass a --guard flag to minitest and only add the
Guard::Minitest::Reporter if the flag is set.

Also the loading of guard related code is deferred and controlled by the --guard flag. This way guard and everything that comes with it will not be loaded outside of guard.

Thanks @zenspider for the inspiration.

Minitest loads all plugins regardless of context and this caused guard
notifiers to fire even when tests were run outside of guard. To fix this
we pass a --guard flag to minitest and only add the
Guard::Minitest::Reporter if the flag is set.

Also the loading of guard related code is deferred and controlled by the
--guard flag. This way guard and everything that comes with it will not
be loaded outside of guard.
@e2 e2 merged commit e707a93 into guard:master Jul 29, 2016
@e2
Copy link
Contributor

e2 commented Jul 29, 2016

Build fails partially because of json needing Ruby >= 2, so this looks ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants