Sha256: c77082d438a6e81eb4f63e65c8567fafc23be7a1afcc69aae46d51622e748c08

Contents?: true

Size: 564 Bytes

Versions: 28

Compression:

Stored size: 564 Bytes

Contents

#!/usr/bin/env rspec
require 'spec_helper'
require 'mcollective/validator/ipv4address_validator'

module MCollective
  module Validator
    describe "#validate" do
      it "should raise an exception if the supplied value is not an ipv4 address" do
        expect{
          Ipv4addressValidator.validate("foobar")
        }.to raise_error(ValidatorError, "value should be an ipv4 address")
      end

      it "should not raise an exception if the supplied value is an ipv4 address" do
        Ipv4addressValidator.validate("1.2.3.4")
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
mcollective-client-2.12.5 spec/unit/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.12.4 spec/unit/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.12.3 spec/unit/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.12.1 spec/unit/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.12.0 spec/unit/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.10.6 spec/unit/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.11.4 spec/unit/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.11.3 spec/unit/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.11.2 spec/unit/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.11.1 spec/unit/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.11.0 spec/unit/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.10.4 spec/unit/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.10.3 spec/unit/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.10.2 spec/unit/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.10.1 spec/unit/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.10.0 spec/unit/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.8.7 spec/unit/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.8.5 spec/unit/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.8.8 spec/unit/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.8.6 spec/unit/mcollective/validator/ipv4address_validator_spec.rb