fix windows test failures (#736)

This commit is contained in:
Graham Paye 2018-11-26 13:22:07 -08:00 committed by GitHub
parent a9a2429c98
commit ee49501c6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -62,7 +62,7 @@ module Google
search_path ||= File.expand_path('.')
if File.exists?(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,
'No client_secrets.json filename supplied ' +
'and/or could not be found in search path.'

View File

@ -1 +1 @@
Hello world
Hello world

View File

@ -35,7 +35,7 @@ RSpec.describe Google::Apis::Core::RawUploadCommand do
it 'should send content' do
command.execute(client)
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
it 'should send upload protocol' do
@ -52,7 +52,7 @@ RSpec.describe Google::Apis::Core::RawUploadCommand do
end
context('with StringIO input') do
let(:file) { StringIO.new("Hello world\n") }
let(:file) { StringIO.new("Hello world") }
include_examples 'should upload'
end
@ -68,7 +68,7 @@ RSpec.describe Google::Apis::Core::RawUploadCommand do
context('with Tempfile input') do
let(:file) do
temp_file = Tempfile.new("tempfile")
temp_file.write("Hello world\n")
temp_file.write("Hello world")
temp_file.rewind
temp_file
end