Skip to content

Commit

Permalink
Merge pull request #558 from sparklemotion/flavorjones/fix-tests-for-…
Browse files Browse the repository at this point in the history
…retry-change-request

test: conditionally skip depending on net-http-persistent < v4
  • Loading branch information
flavorjones committed Jan 23, 2021
2 parents b7c6af7 + 4fc17ae commit c922541
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/test_mechanize.rb
Expand Up @@ -1056,6 +1056,11 @@ def test_referer
end

def test_retry_change_requests_equals
unless Gem::Requirement.new("< 4.0.0").satisfied_by?(Gem::Version.new(Net::HTTP::Persistent::VERSION))
# see https://github.com/drbrain/net-http-persistent/pull/100
skip("net-http-persistent 4.0.0 and later does not support retry_change_requests")
end

refute @mech.retry_change_requests

@mech.retry_change_requests = true
Expand Down
5 changes: 5 additions & 0 deletions test/test_mechanize_http_agent.rb
Expand Up @@ -1590,6 +1590,11 @@ def test_response_redirect_permanent_temporary
end

def test_retry_change_request_equals
unless Gem::Requirement.new("< 4.0.0").satisfied_by?(Gem::Version.new(Net::HTTP::Persistent::VERSION))
# see https://github.com/drbrain/net-http-persistent/pull/100
skip("net-http-persistent 4.0.0 and later does not support retry_change_requests")
end

refute @agent.http.retry_change_requests

@agent.retry_change_requests = true
Expand Down

0 comments on commit c922541

Please sign in to comment.