From: Abdelkader Boudih Date: Wed, 17 Sep 2014 15:03:33 +0000 (+0000) Subject: RSpec 3 syntax X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/740289938b5bf9b8355a1f9c497d307009d675bb RSpec 3 syntax --- diff --git a/spec/google/api_client/batch_spec.rb b/spec/google/api_client/batch_spec.rb index 786c16a777..3aa95a88b6 100644 --- a/spec/google/api_client/batch_spec.rb +++ b/spec/google/api_client/batch_spec.rb @@ -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 diff --git a/spec/google/api_client/discovery_spec.rb b/spec/google/api_client/discovery_spec.rb index a047bab038..d1c23759ff 100644 --- a/spec/google/api_client/discovery_spec.rb +++ b/spec/google/api_client/discovery_spec.rb @@ -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) diff --git a/spec/google/api_client/gzip_spec.rb b/spec/google/api_client/gzip_spec.rb index e05e907370..9448b009f1 100644 --- a/spec/google/api_client/gzip_spec.rb +++ b/spec/google/api_client/gzip_spec.rb @@ -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| diff --git a/spec/google/api_client/media_spec.rb b/spec/google/api_client/media_spec.rb index 0fce150f55..f32b31efc0 100644 --- a/spec/google/api_client/media_spec.rb +++ b/spec/google/api_client/media_spec.rb @@ -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 diff --git a/spec/google/api_client/request_spec.rb b/spec/google/api_client/request_spec.rb index 760a8a34b0..c63f750dc6 100644 --- a/spec/google/api_client/request_spec.rb +++ b/spec/google/api_client/request_spec.rb @@ -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 diff --git a/spec/google/api_client/result_spec.rb b/spec/google/api_client/result_spec.rb index 8c5f09bc96..67c63b77cf 100644 --- a/spec/google/api_client/result_spec.rb +++ b/spec/google/api_client/result_spec.rb @@ -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 diff --git a/spec/google/api_client/service_account_spec.rb b/spec/google/api_client/service_account_spec.rb index f700dfe19d..d4d9a36b65 100644 --- a/spec/google/api_client/service_account_spec.rb +++ b/spec/google/api_client/service_account_spec.rb @@ -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 diff --git a/spec/google/api_client/service_spec.rb b/spec/google/api_client/service_spec.rb index e9c216454f..e5184372c2 100644 --- a/spec/google/api_client/service_spec.rb +++ b/spec/google/api_client/service_spec.rb @@ -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', diff --git a/spec/google/api_client/simple_file_store_spec.rb b/spec/google/api_client/simple_file_store_spec.rb index cc7208d6ea..cb7d898475 100644 --- a/spec/google/api_client/simple_file_store_spec.rb +++ b/spec/google/api_client/simple_file_store_spec.rb @@ -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' diff --git a/spec/google/api_client_spec.rb b/spec/google/api_client_spec.rb index 5d61f73ea8..6cd4c8ee4d 100644 --- a/spec/google/api_client_spec.rb +++ b/spec/google/api_client_spec.rb @@ -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') }