@@ -21,7 +21,7 @@ def stub_s3_response_for_file(key, exists: true)
21
21
expected_key = '939c39398db2405e791e205778ff70f85dff620e/a8c-key1'
22
22
stub_s3_response_for_file ( expected_key , exists : false )
23
23
24
- with_tmp_file_path_for_file_named ( 'input_file_1' ) do |file_path |
24
+ with_tmp_file ( named : 'input_file_1' ) do |file_path |
25
25
expect ( client ) . to receive ( :put_object ) . with ( body : file_instance_of ( file_path ) , bucket : test_bucket , key : expected_key )
26
26
27
27
return_value = run_described_fastlane_action (
@@ -39,7 +39,7 @@ def stub_s3_response_for_file(key, exists: true)
39
39
expected_key = '8bde1a7a04300df27b52f4383dc997e5fbbff180/a8c-key2'
40
40
stub_s3_response_for_file ( expected_key , exists : false )
41
41
42
- with_tmp_file_path_for_file_named ( 'input_file_2' ) do |file_path |
42
+ with_tmp_file ( named : 'input_file_2' ) do |file_path |
43
43
expect ( client ) . to receive ( :put_object ) . with ( body : file_instance_of ( file_path ) , bucket : test_bucket , key : expected_key )
44
44
45
45
return_value = run_described_fastlane_action (
@@ -58,7 +58,7 @@ def stub_s3_response_for_file(key, exists: true)
58
58
expected_key = 'a8c-key1'
59
59
stub_s3_response_for_file ( expected_key , exists : false )
60
60
61
- with_tmp_file_path do |file_path |
61
+ with_tmp_file do |file_path |
62
62
expect ( client ) . to receive ( :put_object ) . with ( body : file_instance_of ( file_path ) , bucket : test_bucket , key : expected_key )
63
63
64
64
return_value = run_described_fastlane_action (
@@ -77,7 +77,7 @@ def stub_s3_response_for_file(key, exists: true)
77
77
expected_key = '939c39398db2405e791e205778ff70f85dff620e/subdir/a8c-key1'
78
78
stub_s3_response_for_file ( expected_key , exists : false )
79
79
80
- with_tmp_file_path_for_file_named ( 'input_file_1' ) do |file_path |
80
+ with_tmp_file ( named : 'input_file_1' ) do |file_path |
81
81
expect ( client ) . to receive ( :put_object ) . with ( body : file_instance_of ( file_path ) , bucket : test_bucket , key : expected_key )
82
82
83
83
return_value = run_described_fastlane_action (
@@ -95,7 +95,7 @@ def stub_s3_response_for_file(key, exists: true)
95
95
expected_key = 'c125bd799c6aad31092b02e440a8fae25b45a2ad/test_file_1'
96
96
stub_s3_response_for_file ( expected_key , exists : false )
97
97
98
- with_tmp_file_path_for_file_named ( 'test_file_1' ) do |file_path |
98
+ with_tmp_file ( named : 'test_file_1' ) do |file_path |
99
99
expect ( client ) . to receive ( :put_object ) . with ( body : file_instance_of ( file_path ) , bucket : test_bucket , key : expected_key )
100
100
101
101
return_value = run_described_fastlane_action (
@@ -112,7 +112,7 @@ def stub_s3_response_for_file(key, exists: true)
112
112
describe 'uploading a file with invalid parameters' do
113
113
it 'fails if bucket is empty or nil' do
114
114
expect do
115
- with_tmp_file_path do |file_path |
115
+ with_tmp_file do |file_path |
116
116
run_described_fastlane_action (
117
117
bucket : '' ,
118
118
key : 'key' ,
@@ -124,7 +124,7 @@ def stub_s3_response_for_file(key, exists: true)
124
124
125
125
it 'fails if an empty key is provided' do
126
126
expect do
127
- with_tmp_file_path do |file_path |
127
+ with_tmp_file do |file_path |
128
128
run_described_fastlane_action (
129
129
bucket : test_bucket ,
130
130
key : '' ,
@@ -148,7 +148,7 @@ def stub_s3_response_for_file(key, exists: true)
148
148
expected_key = 'a62f2225bf70bfaccbc7f1ef2a397836717377de/key'
149
149
stub_s3_response_for_file ( expected_key )
150
150
151
- with_tmp_file_path_for_file_named ( 'key' ) do |file_path |
151
+ with_tmp_file ( named : 'key' ) do |file_path |
152
152
expect do
153
153
run_described_fastlane_action (
154
154
bucket : test_bucket ,
0 commit comments