From ef43463d36419ff16a3bcd04582db6a5dd8b1bf5 Mon Sep 17 00:00:00 2001 From: Espartaco Palma Date: Sat, 26 Nov 2016 23:34:41 -0800 Subject: [PATCH] Removing unused rspec.subject and fixing typos on a variable name --- spec/octokit/rate_limit_spec.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/spec/octokit/rate_limit_spec.rb b/spec/octokit/rate_limit_spec.rb index c20e5940e..b2d9486d7 100644 --- a/spec/octokit/rate_limit_spec.rb +++ b/spec/octokit/rate_limit_spec.rb @@ -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, @@ -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) @@ -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)