test/line_reader_test.rb in iostreams-1.9.0 vs test/line_reader_test.rb in iostreams-1.10.0

- old
+ new

@@ -96,9 +96,16 @@ end assert_equal data, lines assert_equal data.size, count end + it "with no block returns enumerator" do + lines = IOStreams::Line::Reader.file(file_name) do |io| + io.each.first(100) + end + assert_equal data, lines + end + it "each_line stream" do lines = [] count = File.open(file_name) do |file| IOStreams::Line::Reader.stream(file) do |io| io.each { |line| lines << line }