spec/functional/realtime_spec.rb in picky-3.6.16 vs spec/functional/realtime_spec.rb in picky-4.0.0pre1
- old
+ new
@@ -24,11 +24,11 @@
before(:each) do
index.add Book.new(1, "Title", "Author")
end
context 'dumping and loading' do
- it "doesn't find books anymore after dumping and reloading and updating" do
+ it "doesn't find books anymore after dumping and loading and updating" do
index.replace Book.new(2, "Title New", "Author New")
books.search("title").ids.should == [2, 1]
index.dump
@@ -241,11 +241,13 @@
books.search('Athr~').ids.should == [1]
index.replace Book.new(2, "Title New", "Author New")
index.add Book.new(3, "TTL", "AUTHR")
- books.search('author:Athr~').ids.should == [2, 1, 3] # TODO Is that what I'd expect?
+ # Note: [2, 1] are in one allocation, [3] in the other.
+ #
+ books.search('author:Athr~').ids.should == [2, 1, 3]
end
end
end
context 'special index' do
@@ -463,10 +465,12 @@
books.search('Athr~').ids.should == [:one]
index.replace Book.new("two", "Title New", "Author New")
index.add Book.new("three", "TTL", "AUTHR")
- books.search('author:Athr~').ids.should == [:two, :one, :three] # TODO Is that what I'd expect?
+ # Note: Allocations are [:two, :one], then [:three].
+ #
+ books.search('author:Athr~').ids.should == [:two, :one, :three]
end
end
end
end
\ No newline at end of file