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
|
@ -6,7 +6,7 @@ describe "StringIO#gets when passed [separator]" do
|
|||
@io = StringIO.new("this>is>an>example")
|
||||
end
|
||||
|
||||
it "returns the data read till the next occurence of the passed separator" do
|
||||
it "returns the data read till the next occurrence of the passed separator" do
|
||||
@io.gets(">").should == "this>"
|
||||
@io.gets(">").should == "is>"
|
||||
@io.gets(">").should == "an>"
|
||||
|
@ -72,7 +72,7 @@ describe "StringIO#gets when passed no argument" do
|
|||
@io = StringIO.new("this is\nan example\nfor StringIO#gets")
|
||||
end
|
||||
|
||||
it "returns the data read till the next occurence of $/ or till eof" do
|
||||
it "returns the data read till the next occurrence of $/ or till eof" do
|
||||
@io.gets.should == "this is\n"
|
||||
|
||||
begin
|
||||
|
@ -236,3 +236,12 @@ describe "StringIO#gets when in write-only mode" do
|
|||
lambda { io.gets }.should raise_error(IOError)
|
||||
end
|
||||
end
|
||||
|
||||
ruby_version_is "2.4" do
|
||||
describe "StringIO#gets when passed [chomp]" do
|
||||
it "returns the data read without a trailing newline character" do
|
||||
io = StringIO.new("this>is>an>example\n")
|
||||
io.gets(chomp: true).should == "this>is>an>example"
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue