spec/tests/Demand_File_Addresses.rb in Checked-0.1.3 vs spec/tests/Demand_File_Addresses.rb in Checked-0.1.4

- old
+ new

@@ -45,5 +45,17 @@ }.should.raise(Checked::Demand::Failed) .message.should.be == "String, \"\", can't be empty." end end # === describe Demand :file_content! + +describe "Demand :hostname!" do + + it 'must not contain whitespace' do + lambda { + d = Checked::Demand.new('some name') + d.<< :hostname! + }.should.raise(Checked::Demand::Failed) + .message.should.be == 'String, "some name", has invalid characters: " "' + end + +end # === describe Demand :hostname!