From 4e462fb280da0d41f3113bdc0a8e5cda6fd45130 Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Thu, 5 Sep 2024 17:19:35 +1200 Subject: [PATCH] Validate partial output. --- test/protocol/http/body/streamable.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/protocol/http/body/streamable.rb b/test/protocol/http/body/streamable.rb index f367d16..2f4e91f 100644 --- a/test/protocol/http/body/streamable.rb +++ b/test/protocol/http/body/streamable.rb @@ -86,6 +86,8 @@ with "a block that raises an error" do let(:block) do proc do |stream| + stream.write("Hello") + raise "Oh no... a wild error appeared!" end end @@ -97,6 +99,8 @@ expect do body.call(stream) end.to raise_exception(RuntimeError, message: be =~ /Oh no... a wild error appeared!/) + + expect(stream.string).to be == "Hello" end end end