File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -41,13 +41,13 @@ def finish
4141 end
4242
4343 # Buffer the entire request/response body.
44- # @returns [Readable] the buffered body .
44+ # @returns [Reader] itself .
4545 def buffered!
4646 if @body
4747 @body = @body . finish
48-
49- return @body
5048 end
49+
50+ return self
5151 end
5252
5353 # Write the body of the response to the given file path.
Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ class TestReader
1515 def initialize ( body )
1616 @body = body
1717 end
18+
19+ attr :body
1820end
1921
2022describe Protocol ::HTTP ::Body ::Reader do
@@ -29,7 +31,8 @@ def initialize(body)
2931
3032 with '#buffered!' do
3133 it 'buffers the body' do
32- expect ( reader . buffered! ) . to be == body
34+ expect ( reader . buffered! ) . to be_equal ( reader )
35+ expect ( reader . body ) . to be == body
3336 end
3437 end
3538
You can’t perform that action at this time.
0 commit comments