rspec-sidekiq icon indicating copy to clipboard operation
rspec-sidekiq copied to clipboard

Backport of #95 - rspec rails clash

Open bk-one opened this issue 8 years ago • 13 comments

bk-one avatar Sep 27 '16 16:09 bk-one

As this is driving me nuts currently, I've backported #95 for the current 2.x branch. Not sure if this was intentionally left for 3.x, but here it is.

bk-one avatar Sep 27 '16 16:09 bk-one

Coverage Status

Coverage decreased (-0.8%) to 96.0% when pulling 1583344b6f0d3f642434112c2568ff7938c69a83 on bk-one:backport-rspec-rails-clash into 82634afe2ed868cdd7bf3da0e4dfdbcbf46fa754 on philostler:master.

coveralls avatar Sep 27 '16 16:09 coveralls

Coverage Status

Coverage decreased (-0.8%) to 96.0% when pulling 1583344b6f0d3f642434112c2568ff7938c69a83 on bk-one:backport-rspec-rails-clash into 82634afe2ed868cdd7bf3da0e4dfdbcbf46fa754 on philostler:master.

coveralls avatar Sep 27 '16 16:09 coveralls

Coverage Status

Coverage decreased (-0.8%) to 96.0% when pulling 1583344b6f0d3f642434112c2568ff7938c69a83 on bk-one:backport-rspec-rails-clash into 82634afe2ed868cdd7bf3da0e4dfdbcbf46fa754 on philostler:master.

coveralls avatar Sep 27 '16 16:09 coveralls

Any update on this @philostler?

Mange avatar Oct 20 '16 08:10 Mange

I handled this by monkey patching my codebase as such:

# Monkey patch. See https://github.com/philostler/rspec-sidekiq/pull/108
if Gem::Dependency.new('rspec-sidekiq', '< 3.0.0').matching_specs.any?
  module RSpec
    module Sidekiq
      module Matchers
        if Gem::Dependency.new('rspec-rails', '>= 3.4.0').matching_specs.max_by(&:version)
          alias have_enqueued_sidekiq_job have_enqueued_job
        end
      end
    end
  end
end

I removed the warn since it was writing out the deprecation warnings at all times, even when the old matcher isn't used.

Mange avatar Oct 20 '16 08:10 Mange

Any progress on this?

adamgotterer avatar Nov 17 '16 05:11 adamgotterer

👍 Also needed here.

baburdick avatar Jan 05 '17 02:01 baburdick

Now that we've released 3.0 is this change still needed?

packrat386 avatar Apr 05 '17 15:04 packrat386

There may be others who are unable to upgrade to v3 at this time. Might make sense to merge/tag/release it to provide them relief until they can upgrade.

baburdick avatar Apr 05 '17 19:04 baburdick

What @baburdick said .. we haven't upgraded yet. I can let you know once we have.

bk-one avatar Apr 05 '17 22:04 bk-one

Now that we've released 3.0 is this change still needed?

We upgraded to 3.0 recently; I could remove my monkey patch and everything is working like before.


I won't comment on whether or not a patch-level release should be released in the 2.x series. That's up to the maintainer and those that have issues with it.

Mange avatar Sep 15 '17 08:09 Mange

Also upgraded some time ago. Just now stumbling across my now ancient monkey patch, removing it, and seeing tests blithely succeed. All good here.

baburdick avatar May 12 '18 00:05 baburdick