Sha256: 57376f8276e998eb906b11e84bcd088d04f537a5fe4ca27614b288212f671a7d
Contents?: true
Size: 593 Bytes
Versions: 28
Compression:
Stored size: 593 Bytes
Contents
#!/usr/bin/env rspec require 'spec_helper' require 'mcollective/validator/regex_validator' module MCollective module Validator describe "#validate" do it "should raise an exception if the given string does not matches the given regular expression" do expect{ RegexValidator.validate("test", "nottest") }.to raise_error(ValidatorError, "value should match nottest") end it "should not raise an exception if the given string's length is less than the given value" do RegexValidator.validate("test", "test") end end end end
Version data entries
28 entries across 28 versions & 1 rubygems