test/row_reader_test.rb in iostreams-1.1.0 vs test/row_reader_test.rb in iostreams-1.1.1
- old
+ new
@@ -1,36 +1,35 @@
-require_relative 'test_helper'
+require_relative "test_helper"
class RowReaderTest < Minitest::Test
describe IOStreams::Row::Reader do
let :file_name do
- File.join(File.dirname(__FILE__), 'files', 'test.csv')
+ File.join(File.dirname(__FILE__), "files", "test.csv")
end
let :expected do
CSV.read(file_name)
end
- describe '.open' do
- it 'file' do
+ describe ".open" do
+ it "file" do
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
+ it "stream" do
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
end
end
-
end
end