Sha256: c5134f5bef0efa79a641a3f9181117f5a25ddbbe7778286e3d1b9b4d6cb47f04

Contents?: true

Size: 616 Bytes

Versions: 15

Compression:

Stored size: 616 Bytes

Contents

#!/usr/bin/env rspec
require 'spec_helper'
require File.dirname(__FILE__) + '/../../../../../plugins/mcollective/validator/ipv4address_validator.rb'

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

15 entries across 15 versions & 1 rubygems

Version Path
mcollective-client-2.7.0 spec/unit/plugins/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.6.1 spec/unit/plugins/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.6.0 spec/unit/plugins/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.5.3 spec/unit/plugins/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.5.2 spec/unit/plugins/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.5.1 spec/unit/plugins/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.5.0 spec/unit/plugins/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.5.0.rc1 spec/unit/plugins/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.4.1 spec/unit/plugins/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.4.0 spec/unit/plugins/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.2.4 spec/unit/plugins/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.2.3 spec/unit/plugins/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.2.2 spec/unit/plugins/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.2.1 spec/unit/plugins/mcollective/validator/ipv4address_validator_spec.rb
mcollective-client-2.2.0 spec/unit/plugins/mcollective/validator/ipv4address_validator_spec.rb