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

Version Path
remi-0.3.2 spec/data_subjects/s3_file_spec.rb
remi-0.3.1 spec/data_subjects/s3_file_spec.rb
remi-0.3.0 spec/data_subjects/s3_file_spec.rb
remi-0.2.42 spec/extractor/s3_file_spec.rb
remi-0.2.41 spec/extractor/s3_file_spec.rb
remi-0.2.40 spec/extractor/s3_file_spec.rb
remi-0.2.39 spec/extractor/s3_file_spec.rb
remi-0.2.38 spec/extractor/s3_file_spec.rb
remi-0.2.37 spec/extractor/s3_file_spec.rb
remi-0.2.36 spec/extractor/s3_file_spec.rb
remi-0.2.35 spec/extractor/s3_file_spec.rb
remi-0.2.34 spec/extractor/s3_file_spec.rb
remi-0.2.33 spec/extractor/s3_file_spec.rb
remi-0.2.32 spec/extractor/s3_file_spec.rb