dwaite / cookiejar

Manage client-side HTTP cookies in Ruby
BSD 2-Clause "Simplified" License
42 stars 69 forks source link

Fix RSpec block syntax warnings #51

Closed dorianmariecom closed 7 months ago

dorianmariecom commented 2 years ago

There were warnings on RSpec 3.11 about the block syntax


Deprecation Warnings:

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 CookieJar::InvalidCookieError` not `expect(value).to raise CookieJar::InvalidCookieError`
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 CookieJar::InvalidCookieError` not `expect(value).to raise CookieJar::InvalidCookieError`
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 CookieJar::InvalidCookieError` not `expect(value).to raise CookieJar::InvalidCookieError`
Too many similar deprecation messages reported, disregarding further reports. Pass `--deprecation-out` or set `config.deprecation_stream` to a file for full output.

If you need more of the backtrace for any of these deprecations to
identify where to make the necessary changes, you can configure
`config.raise_errors_for_deprecations!`, and it will turn the
deprecation warnings into errors, giving you the full backtrace.

9 deprecation warnings total