Update rubyspec for stringio bug fix
This commit is contained in:
parent
609d73e892
commit
12e34a4276
@ -36,7 +36,8 @@ describe :stringio_each_separator, shared: true do
|
||||
seen.should == ["2 1 2 1 2"]
|
||||
end
|
||||
|
||||
it "yields each paragraph when passed an empty String as separator" do
|
||||
ruby_version_is ''..."3.2" do
|
||||
it "yields each paragraph with two separation characters when passed an empty String as separator" do
|
||||
seen = []
|
||||
io = StringIO.new("para1\n\npara2\n\n\npara3")
|
||||
io.send(@method, "") {|s| seen << s}
|
||||
@ -44,6 +45,16 @@ describe :stringio_each_separator, shared: true do
|
||||
end
|
||||
end
|
||||
|
||||
ruby_version_is "3.2" do
|
||||
it "yields each paragraph with all separation characters when passed an empty String as separator" do
|
||||
seen = []
|
||||
io = StringIO.new("para1\n\npara2\n\n\npara3")
|
||||
io.send(@method, "") {|s| seen << s}
|
||||
seen.should == ["para1\n\n", "para2\n\n\n", "para3"]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe :stringio_each_no_arguments, shared: true do
|
||||
before :each do
|
||||
@io = StringIO.new("a b c d e\n1 2 3 4 5")
|
||||
|
Loading…
x
Reference in New Issue
Block a user