0
0
polecat/spec/index_writer/create_reader_spec.rb
Gibheer d5057a5a26 * new basis for the save and load system of the index
* the old index will disappear and IndexSearcher will be the interface
  for searching through the index
2011-05-30 18:36:51 +02:00

23 lines
584 B
Ruby

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe "IndexReader#read" do
before do
@path = prepare_index_dir
end
it "returns a IndexReader" do
w = Polecat::IndexWriter.new @path
w.create_reader.class.should == Polecat::IndexReader
end
it "returns a different object everytime it is called" do
w = Polecat::IndexWriter.new @path
w.create_reader.should_not == w.create_reader
end
it "returns an IndexReader with the same path" do
w = Polecat::IndexWriter.new @path
w.create_reader.path.should == w.path
end
end