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 deprecation warnings #417

Merged
merged 2 commits into from
May 1, 2022

Conversation

mishina2228
Copy link
Contributor

@mishina2228 mishina2228 commented Mar 25, 2022

This PR suppresses deprecation warnings at test running.
It includes the following:

  • Pass a Document as the second parameter to Nokogiri::XML::Node.new.
    This will suppress the following warning:
    warning: Passing a Node as the second parameter to Node.new is deprecated. Please pass a Document instead, or prefer an 
    alternative constructor like Node#add_child. This will become an error in a future release of Nokogiri.
    
    Please see the following for more details:
    Node.new should be type-checking the second argument (must be a Document) sparklemotion/nokogiri#975
  • Require 'mocha/test_unit' instead of 'mocha/setup'
    This will suppress the following deprecation warning:
    Mocha deprecation warning at /home/runner/work/gollum-lib/gollum-lib/test/helper.rb:9:in `require': Require 'mocha/test_unit', 'mocha/minitest' or 'mocha/api' instead of 'mocha/setup'.
    

Nokogiri warning:

```
warning: Passing a Node as the second parameter to Node.new is deprecated. Please pass a Document instead, or prefer an alternative constructor like Node#add_child. This will become an error in a future release of Nokogiri.
```

Please see the following for more details:
sparklemotion/nokogiri#975
Suppress the following deprecation warning:

```
Mocha deprecation warning at /home/runner/work/gollum-lib/gollum-lib/test/helper.rb:9:in `require': Require 'mocha/test_unit', 'mocha/minitest' or 'mocha/api' instead of 'mocha/setup'.
```
@benjaminwil
Copy link
Member

Thank you!

@benjaminwil benjaminwil merged commit 2e5eee1 into gollum:master May 1, 2022
@mishina2228 mishina2228 deleted the fix-deprecation-warning branch May 2, 2022 06:57
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