Add chapter sort

This commit is contained in:
Alex Ling
2020-07-12 08:59:40 +00:00
parent ea366f263a
commit 360913ee78
2 changed files with 114 additions and 0 deletions
+7
View File
@@ -34,3 +34,10 @@ describe "compare_numerically" do
}.should eq ary
end
end
describe "chapter_sort" do
it "sorts correctly" do
ary = ["Vol.1 Ch.01", "Vol.1 Ch.02", "Vol.2 Ch. 2.5", "Ch. 3", "Ch.04"]
chapter_sort(ary.reverse).should eq ary
end
end