spec/unit/mixin/params_validate_spec.rb in microwave-1.0.4 vs spec/unit/mixin/params_validate_spec.rb in microwave-11.400.2
- old
+ new
@@ -328,13 +328,15 @@
}.should raise_error(ArgumentError)
end
it "asserts that a value returns false from a predicate method" do
lambda do
- @vo.validate({:not_blank => "should pass"}, {:not_blank => {:cannot_be => :blank}})
+ @vo.validate({:not_blank => "should pass"},
+ {:not_blank => {:cannot_be => :nil, :cannot_be => :empty}})
end.should_not raise_error
lambda do
- @vo.validate({:not_blank => ""}, {:not_blank => {:cannot_be => :blank}})
+ @vo.validate({:not_blank => ""},
+ {:not_blank => {:cannot_be => :nil, :cannot_be => :empty}})
end.should raise_error(Chef::Exceptions::ValidationFailed)
end
it "should set and return a value, then return the same value" do
value = "meow"