diff --git a/spec/index_writer/write_spec.rb b/spec/index_writer/write_spec.rb index dbf151f..d8c393e 100644 --- a/spec/index_writer/write_spec.rb +++ b/spec/index_writer/write_spec.rb @@ -25,6 +25,14 @@ describe "IndexWriter#write" do File.exists?(@path + '/index.lock').should == false end + it "takes a higher number for the index file, if there is already one" do + FileUtils.touch @path + '/ind0.ind' + w = Polecat::IndexWriter.new @path + w.add Spec::FooDocument.new + w.write + File.exists?(@path + '/ind1.ind').should == true + end + it "writes a marshalled representation of the document list" do w = Polecat::IndexWriter.new @path doc = Spec::FooDocument.new