Sha256: 0abbba82a27e0747f04883b0fd0bec3becda745ea7cd4f572adbd0d1f032fa62
Contents?: true
Size: 645 Bytes
Versions: 15
Compression:
Stored size: 645 Bytes
Contents
#!/usr/bin/env rspec require 'spec_helper' require File.dirname(__FILE__) + '/../../../../../plugins/mcollective/validator/regex_validator.rb' 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
15 entries across 15 versions & 1 rubygems