var api;

describe('PhoneGap Build REST Client', function() {
    beforeEach(function() {
        api = require('../lib/main');
    });

    it('should support authentication', function() {
        expect(api.auth).toEqual(jasmine.any(Function));
    });
});

@@ -1,45 +1,68 @@
 var 
-api;%0A%0Adescribe('PhoneGap Build REST C
+request = require('request'),%0A    api,%0A    spy;%0A%0Adescribe('c
 lien
@@ -152,50 +152,247 @@
     
-%7D);%0A%0A    it('should support authentication
+    spy = jasmine.createSpy();%0A%0A        spyOn(request, 'post').andCallFake(function(options, callback) %7B%0A            callback(%7B%7D, %7B 'statusCode': 200 %7D, '%7B%7D');%0A        %7D);%0A    %7D);%0A%0A    describe('auth', function() %7B%0A        it('should exist
 ', f
@@ -395,32 +395,36 @@
 ', function() %7B%0A
+    
         expect(a
@@ -464,16 +464,513 @@
 tion));%0A
+        %7D);%0A%0A        it('should return an API object', function() %7B%0A            runs(function() %7B%0A                api.auth('link', 'triforce', spy);%0A            %7D);%0A%0A            waitsFor(function() %7B%0A                return spy.wasCalled;%0A            %7D, 'auth callback should be called');%0A%0A            runs(function() %7B%0A                expect(spy).toHaveBeenCalledWith(%0A                    null,%0A                    jasmine.any(require('../lib/api'))%0A                );%0A            %7D);%0A        %7D);%0A
     %7D);%0A

Add API spec to auth.spec.js