RSpec 3 syntax
This commit is contained in:
parent
f819c4a051
commit
740289938b
|
@ -15,7 +15,7 @@
|
|||
require 'spec_helper'
|
||||
require 'google/api_client'
|
||||
|
||||
describe Google::APIClient::BatchRequest do
|
||||
RSpec.describe Google::APIClient::BatchRequest do
|
||||
CLIENT = Google::APIClient.new(:application_name => 'API Client Tests') unless defined?(CLIENT)
|
||||
|
||||
after do
|
||||
|
|
|
@ -23,7 +23,7 @@ require 'compat/multi_json'
|
|||
require 'signet/oauth_1/client'
|
||||
require 'google/api_client'
|
||||
|
||||
describe Google::APIClient do
|
||||
RSpec.describe Google::APIClient do
|
||||
include ConnectionHelpers
|
||||
CLIENT = Google::APIClient.new(:application_name => 'API Client Tests') unless defined?(CLIENT)
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ require 'spec_helper'
|
|||
|
||||
require 'google/api_client'
|
||||
|
||||
describe Google::APIClient::Gzip do
|
||||
RSpec.describe Google::APIClient::Gzip do
|
||||
|
||||
def create_connection(&block)
|
||||
Faraday.new do |b|
|
||||
|
|
|
@ -18,7 +18,7 @@ require 'google/api_client'
|
|||
|
||||
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')
|
||||
|
@ -56,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)
|
||||
|
@ -104,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
|
||||
|
|
|
@ -16,7 +16,7 @@ require 'spec_helper'
|
|||
|
||||
require 'google/api_client'
|
||||
|
||||
describe Google::APIClient::Request do
|
||||
RSpec.describe Google::APIClient::Request do
|
||||
CLIENT = Google::APIClient.new(:application_name => 'API Client Tests') unless defined?(CLIENT)
|
||||
|
||||
it 'should normalize parameter names to strings' do
|
||||
|
|
|
@ -16,7 +16,7 @@ require 'spec_helper'
|
|||
|
||||
require 'google/api_client'
|
||||
|
||||
describe Google::APIClient::Result do
|
||||
RSpec.describe Google::APIClient::Result do
|
||||
CLIENT = Google::APIClient.new(:application_name => 'API Client Tests') unless defined?(CLIENT)
|
||||
|
||||
describe 'with the plus API' do
|
||||
|
|
|
@ -18,7 +18,7 @@ require 'google/api_client'
|
|||
|
||||
fixtures_path = File.expand_path('../../../fixtures', __FILE__)
|
||||
|
||||
describe Google::APIClient::KeyUtils do
|
||||
RSpec.describe Google::APIClient::KeyUtils do
|
||||
it 'should read PKCS12 files from the filesystem' do
|
||||
if RUBY_PLATFORM == 'java' && RUBY_VERSION.start_with?('1.8')
|
||||
pending "Reading from PKCS12 not supported on jruby 1.8.x"
|
||||
|
@ -53,7 +53,7 @@ describe Google::APIClient::KeyUtils do
|
|||
|
||||
end
|
||||
|
||||
describe Google::APIClient::JWTAsserter do
|
||||
RSpec.describe Google::APIClient::JWTAsserter do
|
||||
include ConnectionHelpers
|
||||
|
||||
before do
|
||||
|
@ -146,7 +146,7 @@ describe Google::APIClient::JWTAsserter do
|
|||
end
|
||||
end
|
||||
|
||||
describe Google::APIClient::ComputeServiceAccount do
|
||||
RSpec.describe Google::APIClient::ComputeServiceAccount do
|
||||
include ConnectionHelpers
|
||||
|
||||
it 'should query metadata server' do
|
||||
|
|
|
@ -21,7 +21,7 @@ require 'google/api_client/service'
|
|||
|
||||
fixtures_path = File.expand_path('../../../fixtures', __FILE__)
|
||||
|
||||
describe Google::APIClient::Service do
|
||||
RSpec.describe Google::APIClient::Service do
|
||||
include ConnectionHelpers
|
||||
|
||||
APPLICATION_NAME = 'API Client Tests'
|
||||
|
@ -288,7 +288,7 @@ describe Google::APIClient::Service do
|
|||
end
|
||||
|
||||
|
||||
describe Google::APIClient::Service::Result do
|
||||
RSpec.describe Google::APIClient::Service::Result do
|
||||
|
||||
describe 'with the plus API' do
|
||||
before do
|
||||
|
@ -492,7 +492,7 @@ describe Google::APIClient::Service::Result do
|
|||
end
|
||||
end
|
||||
|
||||
describe Google::APIClient::Service::BatchRequest do
|
||||
RSpec.describe Google::APIClient::Service::BatchRequest do
|
||||
describe 'with the discovery API' do
|
||||
before do
|
||||
@discovery = Google::APIClient::Service.new('discovery', 'v1',
|
||||
|
|
|
@ -18,7 +18,7 @@ require 'spec_helper'
|
|||
|
||||
require 'google/api_client/service/simple_file_store'
|
||||
|
||||
describe Google::APIClient::Service::SimpleFileStore do
|
||||
RSpec.describe Google::APIClient::Service::SimpleFileStore do
|
||||
|
||||
FILE_NAME = 'test.cache'
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ shared_examples_for 'configurable user agent' do
|
|||
end
|
||||
end
|
||||
|
||||
describe Google::APIClient do
|
||||
RSpec.describe Google::APIClient do
|
||||
include ConnectionHelpers
|
||||
|
||||
let(:client) { Google::APIClient.new(:application_name => 'API Client Tests') }
|
||||
|
|
Loading…
Reference in New Issue