Fix failing Docs::Requester test

pull/29/head
Thibaut 11 years ago
parent 40c1dda27d
commit 562a4c74fe

@ -23,12 +23,12 @@ class DocsRequesterTest < MiniTest::Spec
end end
describe ".new" do describe ".new" do
it "defaults the :max_concurrency to 5" do it "defaults the :max_concurrency to 20" do
assert_equal 5, Docs::Requester.new.max_concurrency assert_equal 20, Docs::Requester.new.max_concurrency
assert_equal 10, Docs::Requester.new(max_concurrency: 10).max_concurrency assert_equal 10, Docs::Requester.new(max_concurrency: 10).max_concurrency
end end
it "duplicates and stores #request_options" do it "duplicates and stores :request_options" do
options[:request_options] = { params: 'test' } options[:request_options] = { params: 'test' }
assert_equal options[:request_options], requester.request_options assert_equal options[:request_options], requester.request_options
refute_same options[:request_options], requester.request_options refute_same options[:request_options], requester.request_options
@ -51,7 +51,7 @@ class DocsRequesterTest < MiniTest::Spec
assert_equal url, request.base_url assert_equal url, request.base_url
end end
it "has the default request options" do it "has the default :request_options" do
options[:request_options] = { params: 'test' } options[:request_options] = { params: 'test' }
request = requester.request(url) request = requester.request(url)
assert_equal 'test', request.options[:params] assert_equal 'test', request.options[:params]

Loading…
Cancel
Save