Sha256: c12cc9610e60c83ee231043c57364566450e137585d31dde8a01f6e12b82123c
Contents?: true
Size: 696 Bytes
Versions: 15
Compression:
Stored size: 696 Bytes
Contents
#!/usr/bin/env rspec require 'spec_helper' require File.dirname(__FILE__) + '/../../../../../plugins/mcollective/validator/array_validator.rb' module MCollective module Validator describe "#validate" do it "should raise an exception if a given element is not defined in a given array" do expect{ Validator::ArrayValidator.validate("element1",["element0", "element2"]) }.to raise_error(ValidatorError, "value should be one of element0, element2") end it "should not raise an exception if a given element is defined in a given array" do Validator::ArrayValidator.validate("element1", ["element1", "element2"]) end end end end
Version data entries
15 entries across 15 versions & 1 rubygems