AresMUSH / aresmush

AresMUSH online text-based game server
Other
30 stars 107 forks source link

Resolve deprecation warnings on test suite by converting should synta… #12

Closed TheStranjer closed 6 years ago

TheStranjer commented 6 years ago

…x to expect syntax and stub syntax to allow syntax

When you run the suite, it gives you this set of deprecation warnings:

Deprecation Warnings:

Using `should` from rspec-expectations' old `:should` syntax without explicitly enabling the syntax is deprecated. Use the new `:expect` syntax or explicitly enable `:should` with `config.expect_with(:rspec) { |c| c.syntax = :should }` instead. Called from /home/ares/aresmush/plugins/channels/specs/channel_alias_specs.rb:22:in `block (3 levels) in <module:Channels>'.

Using `stub` from rspec-mocks' old `:should` syntax without explicitly enabling the syntax is deprecated. Use the new `:expect` syntax or explicitly enable `:should` instead. Called from /home/ares/aresmush/spec/spec_helper.rb:39:in `setup_mock_client'.

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.

2 deprecation warnings total

This commit updates the code while allowing all tests to continue passing.

lynnfaraday commented 6 years ago

Thanks!

If you could please change the target branch from master to v0.16 I'lll merge it.

Also if you want to be credited (in the release notes) by your Ares handle rather than your real name, you can note it here or PM me on the Ares forum.

TheStranjer commented 6 years ago

I'm fine with using my real name. It's not like someone is going to dox me because I went for expect over should. Or will they? 🤔

TheStranjer commented 6 years ago

Also, it's on v0.16 now.

lynnfaraday commented 6 years ago

They'd better not! I only asked because sometimes folks already have screen names they want to be known as within MUSHland.