wspurgin / rspec-sidekiq

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

NameError: uninitialized constant RSpec::Matchers::Composable #212

Closed mamirad closed 2 months ago

mamirad commented 7 months ago

rails aborted! NameError: uninitialized constant RSpec::Matchers::Composable

    include RSpec::Matchers::Composable
                           ^^^^^^^^^^^^

Did you mean? Comparable /home/amir/.rvm/gems/ruby-3.1.4@IWM/gems/rspec-sidekiq-4.1.0/lib/rspec/sidekiq/matchers/base.rb:165:in <class:Base>' /home/amir/.rvm/gems/ruby-3.1.4@IWM/gems/rspec-sidekiq-4.1.0/lib/rspec/sidekiq/matchers/base.rb:163:in' /home/amir/.rvm/gems/ruby-3.1.4@IWM/gems/rspec-sidekiq-4.1.0/lib/rspec/sidekiq/matchers/base.rb:3:in <module:Sidekiq>' /home/amir/.rvm/gems/ruby-3.1.4@IWM/gems/rspec-sidekiq-4.1.0/lib/rspec/sidekiq/matchers/base.rb:2:in' /home/amir/.rvm/gems/ruby-3.1.4@IWM/gems/rspec-sidekiq-4.1.0/lib/rspec/sidekiq/matchers/base.rb:1:in `

'

wspurgin commented 6 months ago

Hi @mamirad, I'll need a little more to go on than this stacktrace. Can you provide a reproduceable example (e.g., Gemfile and example spec)?

wspurgin commented 6 months ago

Just a guess, but do you have rspec-sidekiq in the same group (presumably :test) as rspec in your Gemfile?

lime666 commented 6 months ago

This answer helped me with the same issue: https://stackoverflow.com/questions/27834963/uninitialized-constant-rspecmatcherscomposable

wspurgin commented 5 months ago

Yes I believe that's our friend @mamirad here asking and answering that question. @lime666 can you share your app setup (Gemfile etc.)? I can't reproduce but I made https://github.com/wspurgin/rspec-sidekiq/pull/214 that could be a fix.

wspurgin commented 2 months ago

Seems to be fixed. Couldn't reproduce but since we're explicitly requiring the matchers, I expect it's fixed anyway.