0
0
Fork 0

added a new spec for IndexWriter#write

This commit is contained in:
Gibheer 2011-05-26 21:41:42 +02:00
parent bd8230c4fc
commit 1f9817960a
1 changed files with 8 additions and 0 deletions

View File

@ -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