Created
July 11, 2011 15:26
-
-
Save ewoodh2o/1076086 to your computer and use it in GitHub Desktop.
Sample Chronicle Mock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ChronicleClient | |
class FirstMock < ChronicleClient::Mock | |
def self.response_for(query) | |
return nil if query.client != '0' | |
if query.params[:tags].include?("page_active_users") | |
return ChronicleClient::Response.mock( | |
:highcharts_array => [[1307592000000, 10000000], [1307678400000, 10014000], [1307764800000, 10027000], [1307851200000, 10035000], [1307937600000, 10059000], [1308024000000, 10078000], [1308110400000, 10087000]] | |
) | |
end | |
if query.params[:tags].include?("page_like") | |
return ChronicleClient::Response.mock( | |
:highcharts_array => [[1307592000000, 1636], [1307678400000, 1606], [1307764800000, 1817], [1307851200000, 2044], [1307937600000, 3018], [1308024000000, 3072], [1308110400000, 2795]] | |
) | |
end | |
nil | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment