How to test google analytics (garb) API with Rspec?
I'm using the garb gem to pull some basic stats, like pageviews, from Google Analytics. Everything's working correctly but I can't figure out the best way to test my API calls. Here's a paired down version of my Analytics class: class Analytics extend Garb::Model metrics :pageviews dimensions :page_path Username = 'username' Password = 'password' WebPropertyId = 'XX-XXXXXXX-X' # Start a session with google analytics. # Garb::Session.login(Username, Password) # Find the correct web property. # Property = Garb::Management::Profile.all.detect {|p| p.web_property_id == WebPropertyId} # Returns the