Bump version to lock activesupport dependency, update tests to not use old APIs
[arvados.git] / spec / google / api_client / media_spec.rb
index 8c6515ea596175b0277561be923614ad6e6560a4..944981b187d1978ff518d4b3cad92fd483bfa982 100644 (file)
 require 'spec_helper'
 
 require 'google/api_client'
-require 'google/api_client/version'
 
 fixtures_path = File.expand_path('../../../fixtures', __FILE__)
 
-describe Google::APIClient::UploadIO do
+RSpec.describe Google::APIClient::UploadIO do
   it 'should reject invalid file paths' do
     expect(lambda do
       media = Google::APIClient::UploadIO.new('doesnotexist', 'text/plain')
@@ -57,7 +56,7 @@ describe Google::APIClient::UploadIO do
   end
 end
 
-describe Google::APIClient::RangedIO do
+RSpec.describe Google::APIClient::RangedIO do
   before do
     @source = StringIO.new("1234567890abcdef")
     @io = Google::APIClient::RangedIO.new(@source, 1, 5)
@@ -105,7 +104,7 @@ describe Google::APIClient::RangedIO do
     
 end
 
-describe Google::APIClient::ResumableUpload do
+RSpec.describe Google::APIClient::ResumableUpload do
   CLIENT = Google::APIClient.new(:application_name => 'API Client Tests') unless defined?(CLIENT)
 
   after do
@@ -115,7 +114,7 @@ describe Google::APIClient::ResumableUpload do
   end
 
   before do
-    @drive = CLIENT.discovered_api('drive', 'v1')
+    @drive = CLIENT.discovered_api('drive', 'v2')
     @file = File.expand_path('files/sample.txt', fixtures_path)
     @media = Google::APIClient::UploadIO.new(@file, 'text/plain')
     @uploader = Google::APIClient::ResumableUpload.new(