Skip to content

Commit 15ac43f

Browse files
authored
Merge pull request #1691 from coderdojo-japan/speed-up-test-suites
スタブのあるテスト環境では sleep() を無効化してテストを高速化した
2 parents ec1de86 + 412666a commit 15ac43f

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)