fix windows test failures (#736)
This commit is contained in:
parent
a9a2429c98
commit
ee49501c6c
|
@ -62,7 +62,7 @@ module Google
|
||||||
search_path ||= File.expand_path('.')
|
search_path ||= File.expand_path('.')
|
||||||
if File.exists?(File.join(search_path, 'client_secrets.json'))
|
if File.exists?(File.join(search_path, 'client_secrets.json'))
|
||||||
filename = File.join(search_path, 'client_secrets.json')
|
filename = File.join(search_path, 'client_secrets.json')
|
||||||
elsif search_path == '/' || search_path =~ /[a-zA-Z]:[\/\\]/
|
elsif search_path == File.expand_path('..', search_path)
|
||||||
raise ArgumentError,
|
raise ArgumentError,
|
||||||
'No client_secrets.json filename supplied ' +
|
'No client_secrets.json filename supplied ' +
|
||||||
'and/or could not be found in search path.'
|
'and/or could not be found in search path.'
|
||||||
|
|
|
@ -35,7 +35,7 @@ RSpec.describe Google::Apis::Core::RawUploadCommand do
|
||||||
it 'should send content' do
|
it 'should send content' do
|
||||||
command.execute(client)
|
command.execute(client)
|
||||||
expect(a_request(:post, 'https://www.googleapis.com/zoo/animals')
|
expect(a_request(:post, 'https://www.googleapis.com/zoo/animals')
|
||||||
.with(body: "Hello world\n")).to have_been_made
|
.with(body: "Hello world")).to have_been_made
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should send upload protocol' do
|
it 'should send upload protocol' do
|
||||||
|
@ -52,7 +52,7 @@ RSpec.describe Google::Apis::Core::RawUploadCommand do
|
||||||
end
|
end
|
||||||
|
|
||||||
context('with StringIO input') do
|
context('with StringIO input') do
|
||||||
let(:file) { StringIO.new("Hello world\n") }
|
let(:file) { StringIO.new("Hello world") }
|
||||||
include_examples 'should upload'
|
include_examples 'should upload'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ RSpec.describe Google::Apis::Core::RawUploadCommand do
|
||||||
context('with Tempfile input') do
|
context('with Tempfile input') do
|
||||||
let(:file) do
|
let(:file) do
|
||||||
temp_file = Tempfile.new("tempfile")
|
temp_file = Tempfile.new("tempfile")
|
||||||
temp_file.write("Hello world\n")
|
temp_file.write("Hello world")
|
||||||
temp_file.rewind
|
temp_file.rewind
|
||||||
temp_file
|
temp_file
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue