test/io_streams_test.rb in iostreams-0.16.2 vs test/io_streams_test.rb in iostreams-0.17.0
- old
+ new
@@ -93,9 +93,19 @@
streams = IOStreams.streams_for_file_name('a.XlsX.Gz')
assert_equal [:xlsx, :gz], streams
end
end
+ describe '.scheme_for_file_name' do
+ it 'default' do
+ assert_nil IOStreams.scheme_for_file_name('a.xyz')
+ end
+
+ it 's3' do
+ assert_equal :s3, IOStreams.scheme_for_file_name('s3://a.xyz')
+ end
+ end
+
describe '.each_line' do
it 'returns a line at a time' do
lines = []
count = IOStreams.each_line(source_file_name) { |line| lines << line }
assert_equal data.lines.map(&:strip), lines