spec/naturally_spec.rb in naturally-2.0.0 vs spec/naturally_spec.rb in naturally-2.1.0
- old
+ new
@@ -64,9 +64,16 @@
this: %w(12а 12б 12в 13а 13б 2 3 4 5 10 11 12),
to_this: %w(2 3 4 5 10 11 12 12а 12б 12в 13а 13б)
)
end
+ it 'sorts strings suffixed with underscore and numbers correctly' do
+ it_sorts(
+ this: %w(item_10 item_11 item_1 item_7 item_5 item_3 item_4 item_6 item_2),
+ to_this: %w(item_1 item_2 item_3 item_4 item_5 item_6 item_7 item_10 item_11)
+ )
+ end
+
it 'sorts letters with digits correctly' do
it_sorts(
this: %w(1 a 2 b 3 c),
to_this: %w(1 2 3 a b c)
)