Skip to content

Commit

Permalink
Merge pull request #839 from esparta/fix_spec_rate_limits
Browse files Browse the repository at this point in the history
Removing unused rspec.subject and fixing typos on a variable name
  • Loading branch information
tarebyte authored Dec 1, 2016
2 parents c1d8b83 + ef43463 commit 2bc7691
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions spec/octokit/rate_limit_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
require 'octokit/rate_limit'

describe Octokit::RateLimit do
subject { described_class }

describe ".from_response" do
let(:resonse_headers) do
let(:response_headers) do
{
"X-RateLimit-Limit" => 60,
"X-RateLimit-Remaining" => 42,
Expand All @@ -18,7 +17,7 @@
it "parses rate limit info from response headers" do
expect(response).to receive(:headers).
at_least(:once).
and_return(resonse_headers)
and_return(response_headers)
info = described_class.from_response(response)
expect(info.limit).to eq(60)
expect(info.remaining).to eq(42)
Expand Down Expand Up @@ -49,7 +48,7 @@
expect(response).to receive(:headers).
at_least(:once).
and_return(
resonse_headers.merge("X-RateLimit-Reset" => (Time.now - 60).to_i)
response_headers.merge("X-RateLimit-Reset" => (Time.now - 60).to_i)
)
info = described_class.from_response(response)
expect(info.limit).to eq(60)
Expand Down

0 comments on commit 2bc7691

Please sign in to comment.