Cosmetic: nicer indentations for multiline strings

This commit is contained in:
Frederic Merizen 2018-04-24 13:35:36 +02:00 committed by gregoirenovel
parent 8c5bc0b0a5
commit 47e06812b1

View file

@ -6,28 +6,30 @@ describe 'CellarAdapter' do
describe 'parse_bucket_listing' do describe 'parse_bucket_listing' do
let(:response) do let(:response) do
'<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <<~EOS
<Name>example-bucket</Name> <ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Prefix></Prefix> <Name>example-bucket</Name>
<KeyCount>2</KeyCount> <Prefix></Prefix>
<MaxKeys>1000</MaxKeys> <KeyCount>2</KeyCount>
<Delimiter>/</Delimiter> <MaxKeys>1000</MaxKeys>
<IsTruncated>false</IsTruncated> <Delimiter>/</Delimiter>
<Contents> <IsTruncated>false</IsTruncated>
<Key>sample1.jpg</Key> <Contents>
<LastModified>2011-02-26T01:56:20.000Z</LastModified> <Key>sample1.jpg</Key>
<ETag>&quot;bf1d737a4d46a19f3bced6905cc8b902&quot;</ETag> <LastModified>2011-02-26T01:56:20.000Z</LastModified>
<Size>142863</Size> <ETag>&quot;bf1d737a4d46a19f3bced6905cc8b902&quot;</ETag>
<StorageClass>STANDARD</StorageClass> <Size>142863</Size>
</Contents> <StorageClass>STANDARD</StorageClass>
<Contents> </Contents>
<Key>sample2.jpg</Key> <Contents>
<LastModified>2011-02-26T01:56:20.000Z</LastModified> <Key>sample2.jpg</Key>
<ETag>&quot;bf1d737a4d46a19f3bced6905cc8b902&quot;</ETag> <LastModified>2011-02-26T01:56:20.000Z</LastModified>
<Size>142863</Size> <ETag>&quot;bf1d737a4d46a19f3bced6905cc8b902&quot;</ETag>
<StorageClass>STANDARD</StorageClass> <Size>142863</Size>
</Contents> <StorageClass>STANDARD</StorageClass>
</ListBucketResult>' </Contents>
</ListBucketResult>'
EOS
end end
subject { session.send(:parse_bucket_listing, response) } subject { session.send(:parse_bucket_listing, response) }
@ -37,16 +39,17 @@ describe 'CellarAdapter' do
describe 'bulk_deletion_request_body' do describe 'bulk_deletion_request_body' do
let(:expected_response) do let(:expected_response) do
'<?xml version="1.0" encoding="UTF-8"?> <<~EOS
<Delete> <?xml version="1.0" encoding="UTF-8"?>
<Object> <Delete>
<Key>chapi</Key> <Object>
</Object> <Key>chapi</Key>
<Object> </Object>
<Key>chapo</Key> <Object>
</Object> <Key>chapo</Key>
</Delete> </Object>
' </Delete>
EOS
end end
subject { session.send(:bulk_deletion_request_body, ['chapi', 'chapo']) } subject { session.send(:bulk_deletion_request_body, ['chapi', 'chapo']) }