We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
IO.copy_stream
1 parent 0a44f51 commit 7909cffCopy full SHA for 7909cff
test/protocol/http/body/file.rb
@@ -74,4 +74,26 @@
74
expect(body.read).to be == "ll"
75
end
76
77
+
78
+ with "#call" do
79
+ let(:output) {StringIO.new}
80
81
+ it "can stream output" do
82
+ body.call(output)
83
84
+ expect(output.string).to be == "Hello World"
85
+ end
86
87
+ with "/dev/zero" do
88
+ it "can stream partial output" do
89
+ skip unless File.exist?('/dev/zero')
90
91
+ body = subject.open('/dev/zero', 0...10)
92
93
94
95
+ expect(output.string).to be == "\x00" * 10
96
97
98
99
0 commit comments