3 require File.dirname(__FILE__) + '/../../../../../plugins/mcollective/validator/regex_validator.rb'
7 describe "#validate" do
8 it "should raise an exception if the given string does not matches the given regular expression" do
10 RegexValidator.validate("test", "nottest")
11 }.to raise_error(ValidatorError, "value should match nottest")
14 it "should not raise an exception if the given string's length is less than the given value" do
15 RegexValidator.validate("test", "test")