0
0
polecat/spec/index_reader/locked_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

19 lines
458 B
Ruby

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe "IndexReader#locked?" do
before do
@path = prepare_index_dir
end
it "returns false when the directory is not locked" do
r = Polecat::IndexReader.new @path
r.locked?.should == false
end
it "returns true when the directory is locked" do
FileUtils.touch @path + '/index.lock'
r = Polecat::IndexReader.new @path
r.locked?.should == true
end
end