mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@a6b8805
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6530b14cee
commit
8c5b60eb22
218 changed files with 4069 additions and 328 deletions
|
@ -103,3 +103,12 @@ describe :stringio_each_not_readable, shared: true do
|
|||
lambda { io.send(@method) { |b| b } }.should raise_error(IOError)
|
||||
end
|
||||
end
|
||||
|
||||
describe :stringio_each_chomp, shared: true do
|
||||
it "yields each line with removed newline characters to the passed block" do
|
||||
seen = []
|
||||
io = StringIO.new("a b \rc d e\n1 2 3 4 5\r\nthe end")
|
||||
io.send(@method, chomp: true) {|s| seen << s }
|
||||
seen.should == ["a b \rc d e", "1 2 3 4 5", "the end"]
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue