Fixing broken specs
authorSergio Gomes <sgomes@google.com>
Fri, 4 Oct 2013 13:46:14 +0000 (14:46 +0100)
committerSergio Gomes <sgomes@google.com>
Fri, 4 Oct 2013 13:46:14 +0000 (14:46 +0100)
spec/google/api_client/batch_spec.rb
spec/google/api_client/discovery_spec.rb

index 5c0c7087e140681b8d7b831bd02e7647c05c49fb..aca84ef1882e10369a61f3a4714d0f845c03d753 100644 (file)
@@ -53,7 +53,7 @@ describe Google::APIClient::BatchRequest do
         @call1 = {
           :api_method => @discovery.apis.get_rest,
           :parameters => {
-            'api' => 'adsense',
+            'api' => 'plus',
             'version' => 'v1'
           }
         }
@@ -118,7 +118,7 @@ describe Google::APIClient::BatchRequest do
         @call1 = {
           :api_method => @discovery.apis.get_rest,
           :parameters => {
-            'api' => 'adsense',
+            'api' => 'plus',
             'version' => 'v1'
           }
         }
@@ -244,6 +244,6 @@ describe Google::APIClient::BatchRequest do
         #request[:body].read.gsub("\r", "").should =~ expected_body
       end
     end
-    
+
   end
 end
index 7ee6b22922acc0a00d76aa9a5109a33a54e8f82b..fb1927b304eff671bdfa067f89c95f00d33bae2f 100644 (file)
@@ -86,7 +86,7 @@ describe Google::APIClient do
 
     it 'should correctly determine the discovery URI if :user_ip is set' do
       CLIENT.user_ip = '127.0.0.1'
-      
+
       conn = stub_connection do |stub|
         stub.get('/discovery/v1/apis/prediction/v1.2/rest?userIp=127.0.0.1') do |env|
         end
@@ -199,8 +199,8 @@ describe Google::APIClient do
 
     it 'should generate valid requests when parameter value includes semicolon' do
       conn = stub_connection do |stub|
-        # semicolon (;) in parameter value was being converted to 
-        # bare ampersand (&) in 0.4.7. ensure that it gets converted 
+        # semicolon (;) in parameter value was being converted to
+        # bare ampersand (&) in 0.4.7. ensure that it gets converted
         # to a CGI-escaped semicolon (%3B) instead.
         stub.post('/prediction/v1.2/training?data=12345%3B67890') do |env|
           env[:body].should == ''
@@ -266,7 +266,7 @@ describe Google::APIClient do
           env[:url].host.should == 'testing-domain.example.com'
         end
       end
-        
+
       request = CLIENT.execute(
         :api_method => prediction_rebase.training.insert,
         :parameters => {'data' => '123'},
@@ -417,7 +417,7 @@ describe Google::APIClient do
         stub.get('/plus/v1/people/107807692475771887386/activities/public') do |env|
         end
       end
-      
+
       request = CLIENT.execute(
         :api_method => @plus.activities.list,
         :parameters => {
@@ -474,12 +474,12 @@ describe Google::APIClient do
 
     it 'should find methods that are in the discovery document' do
       CLIENT.discovered_method(
-        'adsense.reports.generate', 'adsense'
+        'adsense.reports.generate', 'adsense', 'v1.3'
       ).name.should == 'generate'
     end
 
     it 'should not find methods that are not in the discovery document' do
-      CLIENT.discovered_method('adsense.bogus', 'adsense').should == nil
+      CLIENT.discovered_method('adsense.bogus', 'adsense', 'v1.3').should == nil
     end
 
     it 'should generate requests against the correct URIs' do