Sha256: dac53f54ac519035718d27eaf25d7a6b72d549d40f2c55ec52561507aa66cd58
Contents?: true
Size: 820 Bytes
Versions: 2
Compression:
Stored size: 820 Bytes
Contents
describe "Demand not_dir!" do it 'must fail for an existing dir' do lambda { d = Checked::Demand.new(File.expand_path "~/") d.<< :not_dir! }.should.raise(Checked::Demand::Failed) end end # === describe Demand not_dir! describe "Demand not_file!" do it 'must fail for an existing file' do lambda { d = Checked::Demand.new(File.expand_path "~/.bashrc") d.<< :not_file! }.should.raise(Checked::Demand::Failed) end end # === describe Demand not_file! describe "Demand :file_content!" do it 'must fail for an empty string' do lambda { d = Checked::Demand.new('') d.<< :file_content! }.should.raise(Checked::Demand::Failed) .message.should.be == "String, \"\", can't be empty." end end # === describe Demand :file_content!
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
Checked-0.1.1 | spec/tests/Demand_File_Addresses.rb |
Checked-0.1.0 | spec/tests/Demand_File_Addresses.rb |