Sha256: 574ecb7b688ed2ab267e05a95554ed52e116fb90dcb92b1fc320a6913b543953
Contents?: true
Size: 594 Bytes
Versions: 28
Compression:
Stored size: 594 Bytes
Contents
#!/usr/bin/env rspec require 'spec_helper' require 'mcollective/validator/length_validator' module MCollective module Validator describe "#validate" do it "should raise an exception if the given string's length is greater than the given value" do expect{ LengthValidator.validate("test", 3) }.to raise_error(ValidatorError, "Input string is longer than 3 character(s)") end it "should not raise an exception if the given string's length is less than the given value" do LengthValidator.validate("test", 4) end end end end
Version data entries
28 entries across 28 versions & 1 rubygems