 
       ERROR_TOO_MANY_REQUESTS = 6
       calls = 0
-      vk.request = ( method, url, params, callback ) ->
+      vk.request = ({ method, url, params, callback }) ->
         calls += 1
         if calls < 3
           callback error: error_code: ERROR_TOO_MANY_REQUESTS



    it "should make a get xhr and call back with parsed json", ( done ) ->
      vk.request "GET", fakeUrl, fakeParams, ( data ) ->
        data.should.deep.equal fakeData

        done()

      fakeXhr.requests.length.should.equal 1
      expect( fakeXhr.requests[ 0 ].method ).to.equal "GET"

        response:
          foo: "bar"

      vk.request = ({ method, url, params, callback }) ->
        method.should.equal "POST"
        url.should.equal fakeUrl
        params.should.deep.equal
