Sha256: 17db6ee2cf070d197a9dca0b5d72bbf79dce83f70018a74f4318cc76734ba338

Contents?: true

Size: 489 Bytes

Versions: 5

Compression:

Stored size: 489 Bytes

Contents

describe "String#lines" do
  it "should split on the default record separator and return enumerator if not block is given" do
    "first\nsecond\nthird".lines.class.should == Enumerator
    "first\nsecond\nthird".lines.entries.class.should == Array
    "first\nsecond\nthird".lines.entries.size.should == 3
    "first\nsecond\nthird".lines.entries.should == ["first\n", "second\n", "third"]
    "first\nsecond\nthird\n".lines.entries.should == ["first\n", "second\n", "third\n"]
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
opal-0.5.5 spec/opal/core/string/lines_spec.rb
opal-0.5.4 spec/corelib/string/lines_spec.rb
opal-0.5.2 spec/corelib/string/lines_spec.rb
opal-0.5.0 spec/corelib/string/lines_spec.rb
opal-0.4.4 spec/rubyspec/core/string/lines_spec.rb