Sha256: a252b49578e0e4729628752d8bf42a4cba8ba88e9d1558f608be0a6839b935c7
Contents?: true
Size: 653 Bytes
Versions: 3
Compression:
Stored size: 653 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe "Ip2proxy" do it "work correctly with ipv4" do i2p = Ip2proxy.new.open(File.dirname(__FILE__) + "/assets/IP2PROXY-IP-PROXYTYPE-COUNTRY-REGION-CITY-ISP.SAMPLE.BIN") record = i2p.getAll('1.0.241.135') record.should_not be_nil record['is_proxy'].should == 1 i2p.close() end it "work correctly with ipv6" do i2p = Ip2proxy.new.open(File.dirname(__FILE__) + "/assets/IP2PROXY-IP-PROXYTYPE-COUNTRY-REGION-CITY-ISP.SAMPLE.BIN") record = i2p.getAll('2001::') record.should_not be_nil record['is_proxy'].should == 0 i2p.close() end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ip2proxy_ruby-1.0.2 | spec/ip2proxy_ruby_spec.rb |
ip2proxy_ruby-1.0.1 | spec/ip2proxy_ruby_spec.rb |
ip2proxy_ruby-1.0.0 | spec/ip2proxy_ruby_spec.rb |