test/paths/s3_test.rb in iostreams-1.0.0.beta3 vs test/paths/s3_test.rb in iostreams-1.0.0.beta4

- old
+ new

@@ -95,10 +95,18 @@ assert write_path.exist? assert_equal raw, write_path.read end end + describe '#each_line' do + it 'reads line by line' do + lines = [] + existing_path.each_line {|line| lines << line} + assert_equal raw.lines.collect(&:chomp), lines + end + end + describe '#each_child' do # TODO: case_sensitive: false, directories: false, hidden: false let(:abd_file_names) { %w[abd/test1.txt abd/test5.file abd/extra/file.csv] } let(:files_for_test) { abd_file_names + %w[xyz/test2.csv xyz/another.csv] } @@ -114,10 +122,11 @@ multiple_paths.each { |path| path.write(raw) unless path.exist? } end it 'existing file returns just the file itself' do # Glorified exists call - assert_equal [each_root.join('readme').to_s], each_root.children("readme").collect(&:to_s) + existing_path + assert_equal root_path.join("test.txt").to_s, root_path.children("test.txt").first.to_s end it 'missing file does nothing' do # Glorified exists call assert_equal [], missing_path.children("readme").collect(&:to_s)