Skip to content

Commit

Permalink
Fix new rubocop errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mfinelli committed Jul 30, 2019
1 parent 9ba6f7f commit 73b5e1e
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions spec/bankrupt/tasks_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,17 @@
end

let(:s3_double) { Aws::S3::Client.new(stub_responses: true) }
let(:s3_response) do
class MockResponse

let(:s3_response_class) do
Class.new do
def etag
'ok'
end
end

MockResponse.new
end

let(:s3_response) { s3_response_class.new }

it 'uploads files to s3' do
allow(Aws::S3::Client).to receive(:new).and_return(s3_double)

Expand Down Expand Up @@ -122,16 +123,17 @@ def etag
end

let(:s3_double) { Aws::S3::Client.new(stub_responses: true) }
let(:s3_response) do
class MockResponse

let(:s3_response_class) do
Class.new do
def deleted
[1]
end
end

MockResponse.new
end

let(:s3_response) { s3_response_class.new }

it 'exits when there aren\'t any files in the manifest' do
allow(Aws::S3::Client).to receive(:new).and_return(s3_double)
allow(s3_double).to receive(:list_objects_v2).and_return(contents: [])
Expand Down

0 comments on commit 73b5e1e

Please sign in to comment.