Skip to content

Commit 412666a

Browse files
committed
スタブのあるテスト環境では sleep() を無効化してテストを高速化した
1 parent ec1de86 commit 412666a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

spec/support/disable_sleep.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# frozen_string_literal: true
2+
3+
RSpec.configure do |config|
4+
# テスト中の不要な sleep を無効化して高速化する
5+
config.before(:each) do
6+
allow_any_instance_of(EventService::Providers::Connpass ).to receive(:sleep)
7+
allow_any_instance_of(EventService::Providers::Doorkeeper).to receive(:sleep)
8+
end
9+
end

0 commit comments

Comments
 (0)