1

テストを実行すると、次のエラーが表示されます

テストごとのライフサイクル外での rspec-mocks からの double または部分的な double の使用はサポートされていません。

describe 'foo_bar'
  require 'sidekiq/testing'
  around(:example) do |example|
    allow_any_instance_of(FooRunner).to receive(:next_tick)
    Sidekiq::Testing.inline! do
      example.run
    end
  end

  it ' ....' do
  end

end

この問題を回避するにはどうすればよいですか?

4

1 に答える 1