spec/naturally_spec.rb in naturally-1.3.0 vs spec/naturally_spec.rb in naturally-1.3.1
- old
+ new
@@ -7,11 +7,11 @@
it 'sorts an array of strings nicely as if they were legal numbers' do
a = %w[676 676.1 676.11 676.12 676.2 676.3 676.9 676.10]
b = %w[676 676.1 676.2 676.3 676.9 676.10 676.11 676.12]
Naturally.sort(a).should == b
end
-
+
it 'sorts a more complex list of strings' do
a = %w[350 351 352 352.1 352.5 353.1 354 354.3 354.4 354.45 354.5]
b = %w[350 351 352 352.1 352.5 353.1 354 354.3 354.4 354.5 354.45]
Naturally.sort(a).should == b
end
@@ -50,11 +50,11 @@
a = %w[12а 12б 12в 13а 13б 2 3 4 5 10 11 12]
b = %w[2 3 4 5 10 11 12 12а 12б 12в 13а 13б]
Naturally.sort(a).should == b
end
end
-
+
describe '#sort_naturally_by' do
it 'sorts by an attribute' do
UbuntuVersion = Struct.new(:name, :version)
releases = [
UbuntuVersion.new('Saucy Salamander', '13.10'),
@@ -73,10 +73,10 @@
'Raring Ringtail',
'Saucy Salamander'
]
end
- it 'sorts by an attribute which contains unicode characters' do
+ it 'sorts by an attribute which contains unicode' do
Thing = Struct.new(:number, :name)
objects = [
Thing.new('1.1', 'Москва'),
Thing.new('1.2', 'Киев'),
Thing.new('1.1.1', 'Париж'),