aboutsummaryrefslogtreecommitdiffstats
path: root/spec/bundler/support/artifice/endpoint_timeout.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/bundler/support/artifice/endpoint_timeout.rb')
-rw-r--r--spec/bundler/support/artifice/endpoint_timeout.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/bundler/support/artifice/endpoint_timeout.rb b/spec/bundler/support/artifice/endpoint_timeout.rb
new file mode 100644
index 0000000000..b15650f226
--- /dev/null
+++ b/spec/bundler/support/artifice/endpoint_timeout.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+require File.expand_path("../endpoint_fallback", __FILE__)
+
+Artifice.deactivate
+
+class EndpointTimeout < EndpointFallback
+ SLEEP_TIMEOUT = 15
+
+ get "/api/v1/dependencies" do
+ sleep(SLEEP_TIMEOUT)
+ end
+end
+
+Artifice.activate_with(EndpointTimeout)