Sha256: ec015571a7a328c5a0aecf8f6e7cea89bc606353c903b2a43b77cba69cc126e7

Contents?: true

Size: 540 Bytes

Versions: 3

Compression:

Stored size: 540 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

describe SecurityGuard::CountryIps do
  before do
    @country_ips = SecurityGuard::CountryIps.new
    @country_ips.countries = ['Australia']
    @country_ips.ips = ['4.4.4.4', '8.8.8.8', '203.206.0.1']
  end

  it 'contains GeoIP data' do
    @country_ips.instance_variable_get(:@geoip).must_be_instance_of SecurityGuard::Utils::GeoIps
  end

  it 'returns all IPs from the given country and IP dictionaries' do
    @country_ips.result.must_equal ['203.206.0.1']
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
security_guard-0.0.3 specs/country_ips_spec.rb
security_guard-0.0.2 specs/country_ips_spec.rb
security_guard-0.0.1 specs/country_ips_spec.rb