From 20aa43f045d841aa31d7b3523618699b9789239b Mon Sep 17 00:00:00 2001 From: Konstantin Gredeskoul Date: Mon, 23 Sep 2024 12:00:14 -0700 Subject: [PATCH] Add timeout around specs --- .github/workflows/rspec.yml | 2 +- spec/spec_helper.rb | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rspec.yml b/.github/workflows/rspec.yml index 47ab15fd..fb060b93 100644 --- a/.github/workflows/rspec.yml +++ b/.github/workflows/rspec.yml @@ -74,4 +74,4 @@ jobs: bin/rails db:test:prepare - name: "Run Rspec" - run: bundle exec rspec + run: bundle exec rspec --format documentation -p 0 --backtrace diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index d0a01e1d..eb3764cc 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -22,4 +22,10 @@ config.expect_with(:rspec) do |c| c.syntax = %i[should expect] end + + config.around(:each) do |example| + Timeout.timeout(5) do + example.run + end + end end