Sha256: 04a16ba3b5bf464f4cc77aea2524fd9ca3c221027fb92cbc3236ac7111cd0ca1

Contents?: true

Size: 542 Bytes

Versions: 6

Compression:

Stored size: 542 Bytes

Contents

require "spec_helper"

describe Validators::Ip do
  context "IPv4" do
    VALID_IPV4.each do |ip|
      it "should accept #{ip.inspect} as ip address" do
        Validators::Ip.should be_v4(ip)
      end
    end
  end

  context "IPv6" do
    VALID_IPV6.each do |ip|
      it "should accept #{ip.inspect} as ip address" do
        Validators::Ip.should be_v6(ip)
      end
    end
  end

  (VALID_IPV4 + VALID_IPV6).each do |ip|
    it "should accept #{ip.inspect} as ip address" do
      Validators::Ip.should be_valid(ip)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
validators-2.1.0 spec/validators/ip_spec.rb
validators-2.0.0 spec/validators/ip_spec.rb
validators-1.0.0 spec/validators/ip_spec.rb
validators-0.1.3 spec/validators/ip_spec.rb
validators-0.1.2 spec/validators/ip_spec.rb
validators-0.1.1 spec/validators/ip_spec.rb