wspurgin / rspec-sidekiq

RSpec for Sidekiq
https://github.com/wspurgin/rspec-sidekiq
Other
662 stars 133 forks source link

Backport of #95 - rspec rails clash #108

Closed bk-one closed 1 year ago

bk-one commented 8 years ago

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.

coveralls commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

Coverage Status

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

Mange commented 8 years ago

Any update on this @philostler?

Mange commented 8 years ago

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.

adamgotterer commented 8 years ago

Any progress on this?

baburdick commented 7 years ago

👍 Also needed here.

packrat386 commented 7 years ago

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

baburdick commented 7 years ago

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.

bk-one commented 7 years ago

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

Mange commented 7 years ago

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.

baburdick commented 6 years ago

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