0
0
Fork 0

find terms in lines

This commit is contained in:
Gibheer 2011-05-10 14:38:02 +02:00
parent 4274de4f02
commit 2ce1f3b9cb
1 changed files with 6 additions and 0 deletions

View File

@ -70,6 +70,12 @@ describe "Index" do
i.search("foo").should == [0, 2]
end
it "returns an array of lines, where the match is somewhere in it" do
i = Polecat::Index.new @path
i.write "foo bar baz"
i.search("baz").should == [0]
end
it "returns an empty array, when no match was found" do
i = Polecat::Index.new @path
i.write "foo"