From 963e24d32708f9af3412c4101c1715b6fa205d66 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 20 Apr 2021 10:25:08 -0500 Subject: [PATCH] Allow skipping tests without being caught in pry --- test/test_helper.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/test_helper.rb b/test/test_helper.rb index b22013b..972fa49 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -14,6 +14,19 @@ require "webmock/minitest" begin require "pry-rescue/minitest" require "pry-reload" + + module Minitest + class Test + alias old_capture_exceptions capture_exceptions + def capture_exceptions + old_capture_exceptions do + yield + rescue Minitest::Skip => e + failures << e + end + end + end + end rescue LoadError # Just helpers for dev, no big deal if missing nil -- 2.38.5