spec/processor_spec.rb in pupa-0.0.9 vs spec/processor_spec.rb in pupa-0.0.10

- old
+ new

@@ -65,9 +65,13 @@ describe '#dump_scraped_objects' do let :path do path = "/tmp/person_#{processor.person._id}.json" end + it 'should return the number of scraped objects by type' do + processor.dump_scraped_objects(:people).should == {'pupa/person' => 1} + end + it 'should not overwrite an existing file' do File.open(path, 'w') {} expect{processor.dump_scraped_objects(:people)}.to raise_error(Pupa::Errors::DuplicateObjectIdError) File.delete(path) end