test/row_reader_test.rb in iostreams-0.20.3 vs test/row_reader_test.rb in iostreams-1.0.0.beta
- old
+ new
@@ -10,21 +10,21 @@
CSV.read(file_name)
end
describe '.open' do
it 'file' do
- rows = []
- count = IOStreams::Row::Reader.open(file_name) do |io|
+ rows = []
+ count = IOStreams::Row::Reader.file(file_name) do |io|
io.each { |row| rows << row }
end
assert_equal expected, rows
assert_equal expected.size, count
end
it 'stream' do
- rows = []
- count = IOStreams.line_reader(file_name) do |file|
- IOStreams::Row::Reader.open(file) do |io|
+ rows = []
+ count = IOStreams::Line::Reader.file(file_name) do |file|
+ IOStreams::Row::Reader.stream(file) do |io|
io.each { |row| rows << row }
end
end
assert_equal expected, rows
assert_equal expected.size, count