Sha256: 1570f86e9e50bb471170ed69b987a7fc6c34f07a16ee7f814c565342b8c60b7c
Contents?: true
Size: 675 Bytes
Versions: 5
Compression:
Stored size: 675 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.get_all('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.get_all('2001::') record.should_not be_nil record['is_proxy'].should == 0 i2p.close() end end
Version data entries
5 entries across 5 versions & 1 rubygems