Allow skipping tests without being caught in pry

Stephen Paul Weber created

Change summary

test/test_helper.rb | 13 +++++++++++++
1 file changed, 13 insertions(+)

Detailed changes

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