spec/lib/smilodon_spec.rb in smilodon-0.2.7 vs spec/lib/smilodon_spec.rb in smilodon-0.2.8

- old
+ new

@@ -60,9 +60,15 @@ it 'calls read for each file passed to populate' do FakePopulatorWithMultipleFiles.files.each { |f| FakePopulatorWithMultipleFiles.should_receive(:read).with(f).and_return('') } FakePopulatorWithMultipleFiles.run end + + context 'given a directory and no files' do + it 'sets files to all the files in directory' do + FakePopulatorWithOnlyDirectory.files.should == ['bar', 'foo'] + end + end end describe FakePopulator, '.run' do module TestPopulator extend Smilodon::Populator