Skip to content

Commit b8ebd82

Browse files
committed
Move read_chunks into a support helper file.
1 parent c7b0834 commit b8ebd82

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

spec/spec_helper.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,7 @@
2020
# so it should be set to true here as well to reflect that.
2121
I18n.enforce_available_locales = true
2222

23-
module Chunks
24-
def read_chunks(body)
25-
buffer = []
26-
body.each { |chunk| buffer << chunk }
27-
28-
buffer
29-
end
30-
end
31-
3223
RSpec.configure do |config|
33-
config.include Chunks
3424
config.include Rack::Test::Methods
3525
config.include Spec::Support::Helpers
3626
config.raise_errors_for_deprecations!

spec/support/chunks.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# frozen_string_literal: true
2+
3+
module Chunks
4+
def read_chunks(body)
5+
buffer = []
6+
body.each { |chunk| buffer << chunk }
7+
8+
buffer
9+
end
10+
end
11+
12+
RSpec.configure do |config|
13+
config.include Chunks
14+
end

0 commit comments

Comments
 (0)