3 require File.dirname(__FILE__) + '/../../../../../plugins/mcollective/validator/shellsafe_validator.rb'
7 describe "#validate" do
8 it "should raise an exception if the given string is not shellsafe" do
9 ['`', '$', ';', '|', '&&', '>', '<'].each do |chr|
11 ShellsafeValidator.validate("#{chr}test")
12 }.to raise_error(ValidatorError, "value should not have #{chr} in it")
16 it "should not raise an exception if the given string is shellsafe" do
17 ShellsafeValidator.validate("test")