-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
https://docs.google.com/spreadsheet/pub?key=0AhjQotX9U0bJdElfR01CM1ZQcHBMRXUyUHlxZFJZalE&output=html
- Loading branch information
Showing
10 changed files
with
136 additions
and
120 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
require 'helper' | ||
|
||
describe Twitter::API do | ||
|
||
before do | ||
@client = Twitter::Client.new | ||
end | ||
|
||
describe "#rate_limit_status" do | ||
before do | ||
stub_get("/1.1/application/rate_limit_status.json"). | ||
to_return(:body => fixture("rate_limit_status.json"), :headers => {:content_type => "application/json; charset=utf-8"}) | ||
end | ||
it "requests the correct resource" do | ||
@client.rate_limit_status | ||
a_get("/1.1/application/rate_limit_status.json"). | ||
should have_been_made | ||
end | ||
it "returns the remaining number of API requests available to the requesting user before the API limit is reached" do | ||
rate_limit_status = @client.rate_limit_status | ||
rate_limit_status.should be_a Twitter::RateLimitStatus | ||
rate_limit_status.remaining_hits.should eq 19993 | ||
end | ||
end | ||
|
||
end |
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
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
Oops, something went wrong.