Skip to content

Commit

Permalink
Fixing old Ruby versions running the specs
Browse files Browse the repository at this point in the history
  • Loading branch information
andyjeffries committed Feb 8, 2018
1 parent 7f74281 commit 8955b9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/lib/base_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -327,14 +327,14 @@ class DummyExample < Flexirest::Base
stub_request(:get, "http://api.example.com/v1").
with(headers: {'Accept'=>'application/hal+json, application/json;q=0.5', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Connection'=>'Keep-Alive', 'Content-Type'=>'application/x-www-form-urlencoded', 'X-Something'=>'foo/bar', 'User-Agent'=>/Flexirest\//}).
to_return(status: 200, body: "", headers: {})
EmptyExample._request("http://api.example.com/v1", :get, {}, {headers: {"X-Something": "foo/bar"}})
EmptyExample._request("http://api.example.com/v1", :get, {}, {headers: {"X-Something" => "foo/bar"}})
end

it "passes headers if the response is unparsed" do
stub_request(:get, "http://api.example.com/v1").
with(headers: {'Accept'=>'application/hal+json, application/json;q=0.5', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Connection'=>'Keep-Alive', 'Content-Type'=>'application/x-www-form-urlencoded', 'X-Something'=>'foo/bar', 'User-Agent'=>/Flexirest\//}).
to_return(status: 200, body: "", headers: {})
EmptyExample._plain_request("http://api.example.com/v1", :get, {}, {headers: {"X-Something": "foo/bar"}})
EmptyExample._plain_request("http://api.example.com/v1", :get, {}, {headers: {"X-Something" => "foo/bar"}})
end

it "runs callbacks as usual" do
Expand Down

0 comments on commit 8955b9d

Please sign in to comment.