Sha256: 0b1ef1931b96eea2a1eb24c4eb7d5a9c50df7152d63d1bf9bb10064471a21106
Contents?: true
Size: 554 Bytes
Versions: 14
Compression:
Stored size: 554 Bytes
Contents
require 'remi_spec' require 'aws-sdk' describe Extractor::S3File do before do Aws.config[:s3] = { stub_responses: true } prefix = "the-best-prefix" @s3_file = Extractor::S3File.new(bucket: 'the-best-bucket', remote_path: "#{prefix}") @s3_file.s3_client.stub_responses(:list_objects, { contents: [ { key: "#{prefix}/file1.csv" }, { key: "#{prefix}/file2.csv" } ] }) end it 'returns all entries' do expect(@s3_file.all_entries.map(&:name)).to eq ['file1.csv', 'file2.csv'] end end
Version data entries
14 entries across 14 versions & 1 rubygems