test/xlsx_reader_test.rb in iostreams-0.20.3 vs test/xlsx_reader_test.rb in iostreams-1.0.0.beta
- old
+ new
@@ -12,22 +12,22 @@
['first column', 'second column', 'third column'],
['data 1', 'data 2', 'more data']
]
end
- describe '.open' do
+ describe '.file' do
describe 'with a file path' do
it 'returns the contents of the file' do
- csv = IOStreams::Xlsx::Reader.open(file_name, &:read)
+ csv = IOStreams::Xlsx::Reader.file(file_name, &:read)
assert_equal xlsx_contents, CSV.parse(csv)
end
end
describe 'with a file stream' do
it 'returns the contents of the file' do
csv = ''
File.open(file_name, 'rb') do |file|
- csv = IOStreams::Xlsx::Reader.open(file, &:read)
+ csv = IOStreams::Xlsx::Reader.stream(file, &:read)
end
assert_equal xlsx_contents, CSV.parse(csv)
end
end