Skip to content

Commit d9f6677

Browse files
committed
Update to webmock 2.0
1 parent 30ef4d3 commit d9f6677

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

rest-client.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
1616
s.homepage = 'https://github.com/rest-client/rest-client'
1717
s.summary = 'Simple HTTP and REST client for Ruby, inspired by microframework syntax for specifying actions.'
1818

19-
s.add_development_dependency('webmock', '~> 1.4')
19+
s.add_development_dependency('webmock', '~> 2.0')
2020
s.add_development_dependency('rspec', '~> 2.99')
2121
s.add_development_dependency('pry', '~> 0')
2222
s.add_development_dependency('pry-doc', '~> 0')

spec/unit/response_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@
109109
end
110110

111111
it "follows a redirection and keep the parameters" do
112-
stub_request(:get, 'http://foo:bar@some/resource').with(:headers => {'Accept' => 'application/json'}).to_return(:body => '', :status => 301, :headers => {'Location' => 'http://new/resource'})
113-
stub_request(:get, 'http://foo:bar@new/resource').with(:headers => {'Accept' => 'application/json'}).to_return(:body => 'Foo')
112+
stub_request(:get, 'http://some/resource').with(:headers => {'Accept' => 'application/json'}, :basic_auth => ['foo', 'bar']).to_return(:body => '', :status => 301, :headers => {'Location' => 'http://new/resource'})
113+
stub_request(:get, 'http://new/resource').with(:headers => {'Accept' => 'application/json'}, :basic_auth => ['foo', 'bar']).to_return(:body => 'Foo')
114114
RestClient::Request.execute(:url => 'http://some/resource', :method => :get, :user => 'foo', :password => 'bar', :headers => {:accept => :json}).body.should eq 'Foo'
115115
end
116116

0 commit comments

Comments
 (0)