diff --git a/spec/test-fifo.cr b/spec/test-fifo.cr index 8ded150..c326374 100644 --- a/spec/test-fifo.cr +++ b/spec/test-fifo.cr @@ -22,7 +22,7 @@ describe "SPECDB::FIFO" do car2 = Car.new "Corvet-2", "red", [] of String car3 = Car.new "Corvet-3", "red", [] of String - db = SPECDB::FIFO(Car).new("", 3) + db = SPECDB::FIFO(Car).new "", 3 db.data.keys.sort.should eq([] of Int32) @@ -34,8 +34,9 @@ describe "SPECDB::FIFO" do db << car2 db.data.keys.sort.should eq([0, 1, 2] of Int32) + db[0] # Let's use the first value, it shouldn't be the one to be dropped. db << car3 - db.data.keys.sort.should eq([1, 2, 3] of Int32) + db.data.keys.sort.should eq([0, 2, 3] of Int32) end end