diff --git a/spec/chewy/strategy/lazy_sidekiq_spec.rb b/spec/chewy/strategy/lazy_sidekiq_spec.rb index 4f8cf52b5..ff7f0988e 100644 --- a/spec/chewy/strategy/lazy_sidekiq_spec.rb +++ b/spec/chewy/strategy/lazy_sidekiq_spec.rb @@ -74,7 +74,9 @@ end it 'calls Index#import!' do - expect(CitiesIndex).to receive(:import!).with([city.id, other_city.id]) + empty_options = {} if RUBY_VERSION < '2.7' + expect(CitiesIndex).to receive(:import!).with(*[[city.id, other_city.id], empty_options].compact) + expect(::Sidekiq::Client).to receive(:push) .with(hash_including('class' => Chewy::Strategy::Sidekiq::Worker, 'queue' => 'low')) .and_call_original