summaryrefslogtreecommitdiff
path: root/spec/support/unicorn.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/unicorn.rb')
-rw-r--r--spec/support/unicorn.rb27
1 files changed, 0 insertions, 27 deletions
diff --git a/spec/support/unicorn.rb b/spec/support/unicorn.rb
deleted file mode 100644
index 0b01fc9e26c..00000000000
--- a/spec/support/unicorn.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-REQUEST_CLASSES = [
- ::Grape::Request,
- ::Rack::Request
-].freeze
-
-def request_body_class
- return ::Unicorn::TeeInput if defined?(::Unicorn)
-
- Class.new(StringIO) do
- def string
- raise NotImplementedError, '#string is only valid under Puma which uses StringIO, use #read instead'
- end
- end
-end
-
-RSpec.configure do |config|
- config.before(:each, :unicorn) do
- REQUEST_CLASSES.each do |request_class|
- allow_any_instance_of(request_class)
- .to receive(:body).and_wrap_original do |m, *args|
- request_body_class.new(m.call(*args).read)
- end
- end
- end
-end