From 2a87a93d489d01f182c1be1e59fe7fe44740d9f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Volker=20Z=C3=B6pfel?= Date: Thu, 14 Nov 2013 15:58:46 +0100 Subject: [PATCH] repair gemspec --- .../api_client/auth/file_storage_spec.rb | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 spec/google/api_client/auth/file_storage_spec.rb diff --git a/spec/google/api_client/auth/file_storage_spec.rb b/spec/google/api_client/auth/file_storage_spec.rb new file mode 100644 index 000000000..d3bcc3b70 --- /dev/null +++ b/spec/google/api_client/auth/file_storage_spec.rb @@ -0,0 +1,26 @@ +require 'spec_helper' +require_relative '../../../../lib/google/api_client' +require_relative '../../../../lib/google/api_client/auth/storage' + +describe Google::APIClient::FileStorage do + let(:client) { Google::APIClient.new(:application_name => 'API Client Tests') } + let(:root_path) { File.expand_path(File.join(__FILE__, '..', '..', '..')) } + let(:json_file) { File.expand_path(File.join(root_path, 'fixtures', 'files', 'credentials.json')) } + + #file_storage = Google::APIClient::FileStorage.new(CREDENTIAL_STORE_FILE) + #if file_storage.authorization.nil? + # client_secrets = Google::APIClient::ClientSecrets.load + it 'should initialize' do + Google::APIClient::FileStorage.any_instance.should_receive(:load_credentials) + file_storage = Google::APIClient::FileStorage.new(json_file) + file_storage.path.to_s.should == json_file + end + + it 'should load_credentials' do + Google::APIClient::FileStorage.any_instance.should_receive(:load_credentials) + + file_storage = Google::APIClient::FileStorage.new(json_file) + file_storage.path.to_s.should == json_file + end + +end