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 RSpec deprecations #1474

Merged
merged 1 commit into from
Apr 8, 2023
Merged

Fix RSpec deprecations #1474

merged 1 commit into from
Apr 8, 2023

Conversation

pirj
Copy link
Contributor

@pirj pirj commented Jan 8, 2023

Description

This fixes some RSpec deprecations (see this for more details) and switches RSpec to fail on deprecations.

  4) YARD::Tags::TypesExplainer YARD::Tags::TypesExplainer::Parser#parse fails on any unrecognized character
     Failure/Error: expect(lambda { parse(types) }).to raise_error(SyntaxError)
       The implicit block expectation syntax is deprecated, you should pass a block rather than an argument to `expect` to use the provided block expectation matcher or the matcher must implement `supports
_value_expectations?`. e.g  `expect { value }.to raise SyntaxError` not `expect(value).to raise SyntaxError`
     # ./spec/tags/types_explainer_spec.rb:15:in `parse_fail'
     # ./spec/tags/types_explainer_spec.rb:170:in `block (3 levels) in <top (required)>'
     # ./spec/spec_helper.rb:129:in `block (2 levels) in <top (required)>'

  5) YARD::Templates::Engine::Template__Users_pirj_source_yard_templates_default_tags param tags on non-methods does not display @param tags on non-method objects
     Failure/Error: expect(proc).not_to raise_error
       The implicit block expectation syntax is deprecated, you should pass a block rather than an argument to `expect` to use the provided block expectation matcher or the matcher must implement `supports
_value_expectations?`. e.g  `expect { value }.to raise Exception` not `expect(value).to raise Exception`
     # ./spec/templates/tag_spec.rb:49:in `block (3 levels) in <top (required)>'
     # ./spec/spec_helper.rb:129:in `block (2 levels) in <top (required)>'

Completed Tasks

  • I have read the Contributing Guide.
  • The pull request is complete (implemented / written).
  • Git commits have been cleaned up (squash WIP / revert commits).
  • I wrote tests and ran bundle exec rake locally (if code is attached to PR).

@lsegal lsegal merged commit cdb8f85 into lsegal:main Apr 8, 2023
@lsegal
Copy link
Owner

lsegal commented Apr 8, 2023

Thanks for the PR!

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