mbleigh / acts-as-taggable-on

A tagging plugin for Rails applications that allows for custom tagging along dynamic contexts.
http://mbleigh.lighthouseapp.com/projects/10116-acts-as-taggable-on
MIT License
4.95k stars 1.18k forks source link

Implicit block expectation syntax is deprecated #1080

Closed kuahyeow closed 2 years ago

kuahyeow commented 2 years ago

Fix to pass a block instead.

Fixes errors like:

  1) acts_as_tagger #tag when called with a non-existent tag context should throw an exception when the default is over-ridden
     Failure/Error:
       expect(-> {
         @tagger.tag(@taggable, with: 'this, and, that', on: :foo_boo, force: false)
       }).to raise_error(RuntimeError)

       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 RuntimeError` not `expect(value).to raise RuntimeError`
kuahyeow commented 2 years ago

@seuros Are you available to look at this PR ? It fixes failing specs on master.