Skip to content

Commit

Permalink
Do not speculate about em-http-request version
Browse files Browse the repository at this point in the history
  • Loading branch information
c960657 committed Sep 22, 2024
1 parent 34d1628 commit 9a957a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/webmock/http_lib_adapters/em_http_request_adapter.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

return if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.4.0') && Gem.loaded_specs['em-http-request'].version <= Gem::Version.new('1.1.7')
return if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.4.0')

begin
require 'em-http-request'
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/em_http_request/em_http_request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

before(:all) do
skip 'em-http-request is not supported on JRuby' if RUBY_PLATFORM =~ /java/
skip 'em-http-request <= 1.1.7 is not supported on Ruby >= 3.4' if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.4.0') && Gem.loaded_specs['em-http-request'].version <= Gem::Version.new('1.1.7')
skip 'em-http-request is not supported on Ruby >= 3.4' if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.4.0')
end

include_context "with WebMock", :no_status_message
Expand Down

0 comments on commit 9a957a2

Please sign in to comment.