added a new spec for IndexWriter#write
This commit is contained in:
parent
bd8230c4fc
commit
1f9817960a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue