test/extra/deployers/test_fog.rb in nanoc-4.2.0b1 vs test/extra/deployers/test_fog.rb in nanoc-4.2.0
- old
+ new
@@ -1,10 +1,11 @@
class Nanoc::Extra::Deployers::FogTest < Nanoc::TestCase
def test_read_etags_with_local_provider
if_have 'fog' do
fog = Nanoc::Extra::Deployers::Fog.new(
- 'output/', provider: 'local')
+ 'output/', provider: 'local'
+ )
files = [
mock('file_a'),
mock('file_b'),
]
@@ -14,11 +15,12 @@
end
def test_read_etags_with_aws_provider
if_have 'fog' do
fog = Nanoc::Extra::Deployers::Fog.new(
- 'output/', provider: 'aws')
+ 'output/', provider: 'aws'
+ )
files = [
mock('file_a', key: 'key_a', etag: 'etag_a'),
mock('file_b', key: 'key_b', etag: 'etag_b'),
]
@@ -33,11 +35,12 @@
end
def test_calc_local_etag_with_local_provider
if_have 'fog' do
fog = Nanoc::Extra::Deployers::Fog.new(
- 'output/', provider: 'local')
+ 'output/', provider: 'local'
+ )
file_path = 'blah.tmp'
File.write(file_path, 'hallo')
assert_nil fog.send(:calc_local_etag, file_path)
@@ -45,25 +48,28 @@
end
def test_calc_local_etag_with_aws_provider
if_have 'fog' do
fog = Nanoc::Extra::Deployers::Fog.new(
- 'output/', provider: 'aws')
+ 'output/', provider: 'aws'
+ )
file_path = 'blah.tmp'
File.write(file_path, 'hallo')
assert_equal(
'598d4c200461b81522a3328565c25f7c',
- fog.send(:calc_local_etag, file_path))
+ fog.send(:calc_local_etag, file_path),
+ )
end
end
def test_needs_upload_with_missing_remote_etag
if_have 'fog' do
fog = Nanoc::Extra::Deployers::Fog.new(
- 'output/', provider: 'aws')
+ 'output/', provider: 'aws'
+ )
file_path = 'blah.tmp'
File.write(file_path, 'hallo')
key = 'some_key'
@@ -74,11 +80,12 @@
end
def test_needs_upload_with_different_etags
if_have 'fog' do
fog = Nanoc::Extra::Deployers::Fog.new(
- 'output/', provider: 'aws')
+ 'output/', provider: 'aws'
+ )
file_path = 'blah.tmp'
File.write(file_path, 'hallo')
key = 'some_key'
@@ -89,10 +96,11 @@
end
def test_needs_upload_with_identical_etags
if_have 'fog' do
fog = Nanoc::Extra::Deployers::Fog.new(
- 'output/', provider: 'aws')
+ 'output/', provider: 'aws'
+ )
file_path = 'blah.tmp'
File.write(file_path, 'hallo')
key = 'some_key'