3 require File.dirname(__FILE__) + '/../../../../../plugins/mcollective/validator/length_validator.rb'
7 describe "#validate" do
8 it "should raise an exception if the given string's length is greater than the given value" do
10 LengthValidator.validate("test", 3)
11 }.to raise_error(ValidatorError, "Input string is longer than 3 character(s)")
14 it "should not raise an exception if the given string's length is less than the given value" do
15 LengthValidator.validate("test", 4)