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

Unpin mocha version and fix deprecation warnings for mocha v1.11.1 #480

Conversation

floehopper
Copy link
Contributor

The undocumented behaviour that was changed in mocha v1.10.x has been reinstated in v1.11.1 albeit with deprecation warnings. Running the sshkit tests against mocha v1.11.1 (the latest version) allowed me to identify and fix two deprecation warnings, one of which was the cause of the problem in #479. I haven't attempted to run the functional tests locally, but hopefully your CI build will catch anything I've missed.

The undocumented behaviour that was changed in v1.10.x has been
reinstated in v1.11.1 with deprecation warnings. So running the tests
against v1.11.1 (the latest version) should not result in any failures.
This change addresses the following deprecation warning:

    Mocha deprecation warning at test/helper.rb:6:in `require': Require 'mocha/test_unit', 'mocha/minitest' or 'mocha/api' instead of 'mocha/setup'.
This addresses the following deprecation warning:

    Mocha deprecation warning at test/unit/formatters/test_pretty.rb:118:in `test_can_write_to_output_which_just_supports_append': Explicitly include `<<` in Hash of stubbed methods vs return values, e.g. `stub(:<< => nil)`.
@mattbrictson mattbrictson added the 🏠 Housekeeping Non-user facing cleanup and maintenance label Dec 21, 2019
@mattbrictson
Copy link
Member

Thanks for the fix, this is a great PR. Congrats on your first contribution to the project!

@mattbrictson mattbrictson merged commit d69522c into capistrano:master Dec 21, 2019
@floehopper floehopper deleted the unpin-mocha-version-and-fix-deprecation-warnings-for-v1.11.1 branch December 21, 2019 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏠 Housekeeping Non-user facing cleanup and maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants