spec/httpi/httpi_spec.rb in httpi-2.4.5 vs spec/httpi/httpi_spec.rb in httpi-2.5.0

- old
+ new

@@ -4,15 +4,13 @@ # find out why httpi doesn't load these automatically. [dh, 2012-12-15] require "excon" require "net/http/persistent" require "http" -unless RUBY_VERSION < "1.9" +unless RUBY_PLATFORM =~ /java/ require "em-synchrony" require "em-http-request" -end -unless RUBY_PLATFORM =~ /java/ require "curb" end describe HTTPI do let(:client) { HTTPI } @@ -292,10 +290,10 @@ it "raises an ArgumentError in case of an invalid adapter" do expect { client.request method, request, :invalid }.to raise_error(ArgumentError) end HTTPI::Adapter::ADAPTERS.each do |adapter, opts| - unless (adapter == :em_http && RUBY_VERSION =~ /1\.8/) || (adapter == :curb && RUBY_PLATFORM =~ /java/) + unless (adapter == :em_http || adapter == :curb) && RUBY_PLATFORM =~ /java/ client_class = { :httpclient => lambda { HTTPClient }, :curb => lambda { Curl::Easy }, :net_http => lambda { Net::HTTP }, :net_http_persistent => lambda { Net::HTTP::Persistent },