Редни числителни имена
- Краен срок
- 27.10.2016 17:00
Срокът за предаване на решения е отминал
Дефинирайте функцията ordinalize
, която приема единствен аргумент number
(цяло число) и връща низ, съдържащ съответното на number
редно числително име.
Примери:
ordinalize(5) # => '5th'
ordinalize(12) # => '12th'
ordinalize(-11) # => '-11th'
Правила за образуване на редни числителни имена в английския език:
- Към бройното числително се добавя
th
. Примери: 0 -> 0th
, 4 -> 4th
, 11 -> 11th
, 5111 -> 5111th
и т.н.
- Изключения от правилото:
-
1 -> 1st
, 2 -> 2nd
и 3 -> 3rd
.
-
21 -> 21st
, 22 -> 22nd
и 23 -> 23rd
.
-
31 -> 31st
, 32 -> 32nd
и 33 -> 33rd
.
- И т.н.
Бележки
- Върнатият низ е на английски език.
- Числителните редни в английския език
- Редното числително се образува като се добави наставка към бройното
числително. Очакваме
1st
, а не first
.
- Функцията трябва да работи и с отрицателни числа.
- Функцията приема цяло число, а не низ.
Решения
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Христо Владев
.....
Finished in 0.00335 seconds
5 examples, 0 failures
-
Некоректно
- 3 успешни тест(а)
- 2 неуспешни тест(а)
Калина Бухлева
...FF
Failures:
1) #ordinalize works with negative numbers
Failure/Error: expect(ordinalize(number)).to eq ordinalized
expected: "-1st"
got: "-1th"
(compared using ==)
# /tmp/d20161027-13689-1n1ply2/spec.rb:4:in `block in expect_transformations'
# /tmp/d20161027-13689-1n1ply2/spec.rb:3:in `each'
# /tmp/d20161027-13689-1n1ply2/spec.rb:3:in `expect_transformations'
# /tmp/d20161027-13689-1n1ply2/spec.rb:54:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (2 levels) in <top (required)>'
2) #ordinalize works with big numbers
Failure/Error: expect(ordinalize(number)).to eq ordinalized
expected: "-1000000001st"
got: "-1000000001th"
(compared using ==)
# /tmp/d20161027-13689-1n1ply2/spec.rb:4:in `block in expect_transformations'
# /tmp/d20161027-13689-1n1ply2/spec.rb:3:in `each'
# /tmp/d20161027-13689-1n1ply2/spec.rb:3:in `expect_transformations'
# /tmp/d20161027-13689-1n1ply2/spec.rb:87:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (2 levels) in <top (required)>'
Finished in 0.00325 seconds
5 examples, 2 failures
Failed examples:
rspec /tmp/d20161027-13689-1n1ply2/spec.rb:53 # #ordinalize works with negative numbers
rspec /tmp/d20161027-13689-1n1ply2/spec.rb:86 # #ordinalize works with big numbers
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Здравко Петров
.....
Finished in 0.00378 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Петър Нетовски
.....
Finished in 0.00374 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Христо Христов
.....
Finished in 0.00397 seconds
5 examples, 0 failures
-
Некоректно
- 2 успешни тест(а)
- 3 неуспешни тест(а)
Мариян Асенов
..FFF
Failures:
1) #ordinalize handles 'first, second, third' special cases
Failure/Error: expect(ordinalize(number)).to eq ordinalized
expected: "1st"
got: "1th"
(compared using ==)
# /tmp/d20161027-13689-1foc3g3/spec.rb:4:in `block in expect_transformations'
# /tmp/d20161027-13689-1foc3g3/spec.rb:3:in `each'
# /tmp/d20161027-13689-1foc3g3/spec.rb:3:in `expect_transformations'
# /tmp/d20161027-13689-1foc3g3/spec.rb:36:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (2 levels) in <top (required)>'
2) #ordinalize works with negative numbers
Failure/Error: expect(ordinalize(number)).to eq ordinalized
expected: "-1st"
got: "-1th"
(compared using ==)
# /tmp/d20161027-13689-1foc3g3/spec.rb:4:in `block in expect_transformations'
# /tmp/d20161027-13689-1foc3g3/spec.rb:3:in `each'
# /tmp/d20161027-13689-1foc3g3/spec.rb:3:in `expect_transformations'
# /tmp/d20161027-13689-1foc3g3/spec.rb:54:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (2 levels) in <top (required)>'
3) #ordinalize works with big numbers
Failure/Error: expect(ordinalize(number)).to eq ordinalized
expected: "-1000000001st"
got: "-1000000001th"
(compared using ==)
# /tmp/d20161027-13689-1foc3g3/spec.rb:4:in `block in expect_transformations'
# /tmp/d20161027-13689-1foc3g3/spec.rb:3:in `each'
# /tmp/d20161027-13689-1foc3g3/spec.rb:3:in `expect_transformations'
# /tmp/d20161027-13689-1foc3g3/spec.rb:87:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (2 levels) in <top (required)>'
Finished in 0.00323 seconds
5 examples, 3 failures
Failed examples:
rspec /tmp/d20161027-13689-1foc3g3/spec.rb:35 # #ordinalize handles 'first, second, third' special cases
rspec /tmp/d20161027-13689-1foc3g3/spec.rb:53 # #ordinalize works with negative numbers
rspec /tmp/d20161027-13689-1foc3g3/spec.rb:86 # #ordinalize works with big numbers
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Ралица Дарджонова
.....
Finished in 0.00357 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Светослав Годжев
.....
Finished in 0.00417 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Добрин Цветков
.....
Finished in 0.00334 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Христина Тодорова
.....
Finished in 0.0037 seconds
5 examples, 0 failures
-
Некоректно
- 3 успешни тест(а)
- 2 неуспешни тест(а)
Лазар Дилов
F..F.
Failures:
1) #ordinalize adds 'th' to the cardinal number in the common case
Failure/Error: expect(ordinalize(number)).to eq ordinalized
expected: "111th"
got: "111st"
(compared using ==)
# /tmp/d20161027-13689-9b6f4e/spec.rb:4:in `block in expect_transformations'
# /tmp/d20161027-13689-9b6f4e/spec.rb:3:in `each'
# /tmp/d20161027-13689-9b6f4e/spec.rb:3:in `expect_transformations'
# /tmp/d20161027-13689-9b6f4e/spec.rb:9:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (2 levels) in <top (required)>'
2) #ordinalize works with negative numbers
Failure/Error: expect(ordinalize(number)).to eq ordinalized
expected: "-111th"
got: "-111st"
(compared using ==)
# /tmp/d20161027-13689-9b6f4e/spec.rb:4:in `block in expect_transformations'
# /tmp/d20161027-13689-9b6f4e/spec.rb:3:in `each'
# /tmp/d20161027-13689-9b6f4e/spec.rb:3:in `expect_transformations'
# /tmp/d20161027-13689-9b6f4e/spec.rb:54:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (2 levels) in <top (required)>'
Finished in 0.00363 seconds
5 examples, 2 failures
Failed examples:
rspec /tmp/d20161027-13689-9b6f4e/spec.rb:8 # #ordinalize adds 'th' to the cardinal number in the common case
rspec /tmp/d20161027-13689-9b6f4e/spec.rb:53 # #ordinalize works with negative numbers
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Петко Митков
.....
Finished in 0.00371 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Божидар Михайлов
.....
Finished in 0.00723 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Мила Бянкова
.....
Finished in 0.01294 seconds
5 examples, 0 failures
-
Некоректно
- 3 успешни тест(а)
- 2 неуспешни тест(а)
Малина Демирова
...FF
Failures:
1) #ordinalize works with negative numbers
Failure/Error: expect(ordinalize(number)).to eq ordinalized
expected: "-1st"
got: "-1th"
(compared using ==)
# /tmp/d20161027-13689-p91mpd/spec.rb:4:in `block in expect_transformations'
# /tmp/d20161027-13689-p91mpd/spec.rb:3:in `each'
# /tmp/d20161027-13689-p91mpd/spec.rb:3:in `expect_transformations'
# /tmp/d20161027-13689-p91mpd/spec.rb:54:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (2 levels) in <top (required)>'
2) #ordinalize works with big numbers
Failure/Error: expect(ordinalize(number)).to eq ordinalized
expected: "-1000000001st"
got: "-1000000001th"
(compared using ==)
# /tmp/d20161027-13689-p91mpd/spec.rb:4:in `block in expect_transformations'
# /tmp/d20161027-13689-p91mpd/spec.rb:3:in `each'
# /tmp/d20161027-13689-p91mpd/spec.rb:3:in `expect_transformations'
# /tmp/d20161027-13689-p91mpd/spec.rb:87:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (2 levels) in <top (required)>'
Finished in 0.00323 seconds
5 examples, 2 failures
Failed examples:
rspec /tmp/d20161027-13689-p91mpd/spec.rb:53 # #ordinalize works with negative numbers
rspec /tmp/d20161027-13689-p91mpd/spec.rb:86 # #ordinalize works with big numbers
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Николина Гюрова
.....
Finished in 0.00405 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Петър Велев
.....
Finished in 0.00338 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Дарин Тодоров
.....
Finished in 0.0033 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Момчил Баталов
.....
Finished in 0.00534 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Милен Дончев
.....
Finished in 0.00362 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Александър Илиев
.....
Finished in 0.00442 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Беатрис Бонева
.....
Finished in 0.00341 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Петър Скорчелиев
.....
Finished in 0.00408 seconds
5 examples, 0 failures
-
Некоректно
- 3 успешни тест(а)
- 2 неуспешни тест(а)
Константин Димитров
F..F.
Failures:
1) #ordinalize adds 'th' to the cardinal number in the common case
Failure/Error: expect(ordinalize(number)).to eq ordinalized
expected: "11th"
got: "11st"
(compared using ==)
# /tmp/d20161027-13689-dho8pz/spec.rb:4:in `block in expect_transformations'
# /tmp/d20161027-13689-dho8pz/spec.rb:3:in `each'
# /tmp/d20161027-13689-dho8pz/spec.rb:3:in `expect_transformations'
# /tmp/d20161027-13689-dho8pz/spec.rb:9:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (2 levels) in <top (required)>'
2) #ordinalize works with negative numbers
Failure/Error: expect(ordinalize(number)).to eq ordinalized
expected: "-11th"
got: "-11st"
(compared using ==)
# /tmp/d20161027-13689-dho8pz/spec.rb:4:in `block in expect_transformations'
# /tmp/d20161027-13689-dho8pz/spec.rb:3:in `each'
# /tmp/d20161027-13689-dho8pz/spec.rb:3:in `expect_transformations'
# /tmp/d20161027-13689-dho8pz/spec.rb:54:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (2 levels) in <top (required)>'
Finished in 0.0033 seconds
5 examples, 2 failures
Failed examples:
rspec /tmp/d20161027-13689-dho8pz/spec.rb:8 # #ordinalize adds 'th' to the cardinal number in the common case
rspec /tmp/d20161027-13689-dho8pz/spec.rb:53 # #ordinalize works with negative numbers
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Методи Димитров
.....
Finished in 0.00427 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Георги Иванов
.....
Finished in 0.00396 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Кузман Белев
.....
Finished in 0.00372 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Никола Жишев
.....
Finished in 0.00339 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Даниела Русева
.....
Finished in 0.00371 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Симеон Гергинов
.....
Finished in 0.00376 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Владимир Алексиев
.....
Finished in 0.00417 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Александър Ойнаков
.....
Finished in 0.00378 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Иван Станков
.....
Finished in 0.00364 seconds
5 examples, 0 failures
-
Некоректно
- 3 успешни тест(а)
- 2 неуспешни тест(а)
Красимир Тренчев
...FF
Failures:
1) #ordinalize works with negative numbers
Failure/Error: expect(ordinalize(number)).to eq ordinalized
expected: "-1st"
got: "-1th"
(compared using ==)
# /tmp/d20161027-13689-414q4c/spec.rb:4:in `block in expect_transformations'
# /tmp/d20161027-13689-414q4c/spec.rb:3:in `each'
# /tmp/d20161027-13689-414q4c/spec.rb:3:in `expect_transformations'
# /tmp/d20161027-13689-414q4c/spec.rb:54:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (2 levels) in <top (required)>'
2) #ordinalize works with big numbers
Failure/Error: expect(ordinalize(number)).to eq ordinalized
expected: "-1000000001st"
got: "-1000000001th"
(compared using ==)
# /tmp/d20161027-13689-414q4c/spec.rb:4:in `block in expect_transformations'
# /tmp/d20161027-13689-414q4c/spec.rb:3:in `each'
# /tmp/d20161027-13689-414q4c/spec.rb:3:in `expect_transformations'
# /tmp/d20161027-13689-414q4c/spec.rb:87:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (2 levels) in <top (required)>'
Finished in 0.00321 seconds
5 examples, 2 failures
Failed examples:
rspec /tmp/d20161027-13689-414q4c/spec.rb:53 # #ordinalize works with negative numbers
rspec /tmp/d20161027-13689-414q4c/spec.rb:86 # #ordinalize works with big numbers
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Костадин Самарджиев
.....
Finished in 0.00462 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Валентин Георгиев
.....
Finished in 0.00326 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
София Петрова
.....
Finished in 0.00343 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Исмаил Алиджиков
.....
Finished in 0.00337 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Виктор Маринов
.....
Finished in 0.00333 seconds
5 examples, 0 failures
-
Некоректно
- 2 успешни тест(а)
- 3 неуспешни тест(а)
Константин Нецов
F..FF
Failures:
1) #ordinalize adds 'th' to the cardinal number in the common case
Failure/Error: expect(ordinalize(number)).to eq ordinalized
expected: "111th"
got: "111st"
(compared using ==)
# /tmp/d20161027-13689-apse0q/spec.rb:4:in `block in expect_transformations'
# /tmp/d20161027-13689-apse0q/spec.rb:3:in `each'
# /tmp/d20161027-13689-apse0q/spec.rb:3:in `expect_transformations'
# /tmp/d20161027-13689-apse0q/spec.rb:9:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (2 levels) in <top (required)>'
2) #ordinalize works with negative numbers
Failure/Error: expect(ordinalize(number)).to eq ordinalized
expected: "-1st"
got: "-1th"
(compared using ==)
# /tmp/d20161027-13689-apse0q/spec.rb:4:in `block in expect_transformations'
# /tmp/d20161027-13689-apse0q/spec.rb:3:in `each'
# /tmp/d20161027-13689-apse0q/spec.rb:3:in `expect_transformations'
# /tmp/d20161027-13689-apse0q/spec.rb:54:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (2 levels) in <top (required)>'
3) #ordinalize works with big numbers
Failure/Error: expect(ordinalize(number)).to eq ordinalized
expected: "-1000000001st"
got: "-1000000001th"
(compared using ==)
# /tmp/d20161027-13689-apse0q/spec.rb:4:in `block in expect_transformations'
# /tmp/d20161027-13689-apse0q/spec.rb:3:in `each'
# /tmp/d20161027-13689-apse0q/spec.rb:3:in `expect_transformations'
# /tmp/d20161027-13689-apse0q/spec.rb:87:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (2 levels) in <top (required)>'
Finished in 0.00334 seconds
5 examples, 3 failures
Failed examples:
rspec /tmp/d20161027-13689-apse0q/spec.rb:8 # #ordinalize adds 'th' to the cardinal number in the common case
rspec /tmp/d20161027-13689-apse0q/spec.rb:53 # #ordinalize works with negative numbers
rspec /tmp/d20161027-13689-apse0q/spec.rb:86 # #ordinalize works with big numbers
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Михаил Здравков
.....
Finished in 0.00382 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Цветан Христов
.....
Finished in 0.00333 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Теодор Филипов
.....
Finished in 0.00409 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Иво Яков
.....
Finished in 0.00333 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Кристъфър Коруев
.....
Finished in 0.00348 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Антон Сотиров
.....
Finished in 0.0033 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Васил Чимев
.....
Finished in 0.00373 seconds
5 examples, 0 failures
-
Некоректно
- 3 успешни тест(а)
- 2 неуспешни тест(а)
Калоян Евтимов
F..F.
Failures:
1) #ordinalize adds 'th' to the cardinal number in the common case
Failure/Error: expect(ordinalize(number)).to eq ordinalized
expected: "111th"
got: "111st"
(compared using ==)
# /tmp/d20161027-13689-3ngmyc/spec.rb:4:in `block in expect_transformations'
# /tmp/d20161027-13689-3ngmyc/spec.rb:3:in `each'
# /tmp/d20161027-13689-3ngmyc/spec.rb:3:in `expect_transformations'
# /tmp/d20161027-13689-3ngmyc/spec.rb:9:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (2 levels) in <top (required)>'
2) #ordinalize works with negative numbers
Failure/Error: expect(ordinalize(number)).to eq ordinalized
expected: "-111th"
got: "-111st"
(compared using ==)
# /tmp/d20161027-13689-3ngmyc/spec.rb:4:in `block in expect_transformations'
# /tmp/d20161027-13689-3ngmyc/spec.rb:3:in `each'
# /tmp/d20161027-13689-3ngmyc/spec.rb:3:in `expect_transformations'
# /tmp/d20161027-13689-3ngmyc/spec.rb:54:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (2 levels) in <top (required)>'
Finished in 0.00341 seconds
5 examples, 2 failures
Failed examples:
rspec /tmp/d20161027-13689-3ngmyc/spec.rb:8 # #ordinalize adds 'th' to the cardinal number in the common case
rspec /tmp/d20161027-13689-3ngmyc/spec.rb:53 # #ordinalize works with negative numbers
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Мая Терзиева
.....
Finished in 0.00411 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Богомила Пенева
.....
Finished in 0.00338 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Добромира Лозева
.....
Finished in 0.00351 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Йордан Иванов
.....
Finished in 0.0034 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Христо Кирилов
.....
Finished in 0.03392 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Делян Лафчиев
.....
Finished in 0.00703 seconds
5 examples, 0 failures
-
Некоректно
- 3 успешни тест(а)
- 2 неуспешни тест(а)
Георги Карапетров
F..F.
Failures:
1) #ordinalize adds 'th' to the cardinal number in the common case
Failure/Error: expect(ordinalize(number)).to eq ordinalized
expected: "111th"
got: "111st"
(compared using ==)
# /tmp/d20161027-13689-6ov38h/spec.rb:4:in `block in expect_transformations'
# /tmp/d20161027-13689-6ov38h/spec.rb:3:in `each'
# /tmp/d20161027-13689-6ov38h/spec.rb:3:in `expect_transformations'
# /tmp/d20161027-13689-6ov38h/spec.rb:9:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (2 levels) in <top (required)>'
2) #ordinalize works with negative numbers
Failure/Error: expect(ordinalize(number)).to eq ordinalized
expected: "-111th"
got: "-111st"
(compared using ==)
# /tmp/d20161027-13689-6ov38h/spec.rb:4:in `block in expect_transformations'
# /tmp/d20161027-13689-6ov38h/spec.rb:3:in `each'
# /tmp/d20161027-13689-6ov38h/spec.rb:3:in `expect_transformations'
# /tmp/d20161027-13689-6ov38h/spec.rb:54:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (2 levels) in <top (required)>'
Finished in 0.00351 seconds
5 examples, 2 failures
Failed examples:
rspec /tmp/d20161027-13689-6ov38h/spec.rb:8 # #ordinalize adds 'th' to the cardinal number in the common case
rspec /tmp/d20161027-13689-6ov38h/spec.rb:53 # #ordinalize works with negative numbers
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Натали Арабаджийска
.....
Finished in 0.00336 seconds
5 examples, 0 failures
-
Некоректно
- 3 успешни тест(а)
- 2 неуспешни тест(а)
Станислав Димитров
...FF
Failures:
1) #ordinalize works with negative numbers
Failure/Error: expect(ordinalize(number)).to eq ordinalized
expected: "-1st"
got: "-1th"
(compared using ==)
# /tmp/d20161027-13689-p2ttyu/spec.rb:4:in `block in expect_transformations'
# /tmp/d20161027-13689-p2ttyu/spec.rb:3:in `each'
# /tmp/d20161027-13689-p2ttyu/spec.rb:3:in `expect_transformations'
# /tmp/d20161027-13689-p2ttyu/spec.rb:54:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (2 levels) in <top (required)>'
2) #ordinalize works with big numbers
Failure/Error: expect(ordinalize(number)).to eq ordinalized
expected: "-1000000001st"
got: "-1000000001th"
(compared using ==)
# /tmp/d20161027-13689-p2ttyu/spec.rb:4:in `block in expect_transformations'
# /tmp/d20161027-13689-p2ttyu/spec.rb:3:in `each'
# /tmp/d20161027-13689-p2ttyu/spec.rb:3:in `expect_transformations'
# /tmp/d20161027-13689-p2ttyu/spec.rb:87:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (2 levels) in <top (required)>'
Finished in 0.00326 seconds
5 examples, 2 failures
Failed examples:
rspec /tmp/d20161027-13689-p2ttyu/spec.rb:53 # #ordinalize works with negative numbers
rspec /tmp/d20161027-13689-p2ttyu/spec.rb:86 # #ordinalize works with big numbers
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Теодора Петкова
.....
Finished in 0.0034 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Стоян Томицин
.....
Finished in 0.00336 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Стамен Драгоев
.....
Finished in 0.00363 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Елеонора Кайкова
.....
Finished in 0.00339 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Сияна Плачкова
.....
Finished in 0.00338 seconds
5 examples, 0 failures
-
Некоректно
- 3 успешни тест(а)
- 2 неуспешни тест(а)
Стефан Якимов
F..F.
Failures:
1) #ordinalize adds 'th' to the cardinal number in the common case
Failure/Error: expect(ordinalize(number)).to eq ordinalized
expected: "11th"
got: "11st"
(compared using ==)
# /tmp/d20161027-13689-1ctk44j/spec.rb:4:in `block in expect_transformations'
# /tmp/d20161027-13689-1ctk44j/spec.rb:3:in `each'
# /tmp/d20161027-13689-1ctk44j/spec.rb:3:in `expect_transformations'
# /tmp/d20161027-13689-1ctk44j/spec.rb:9:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (2 levels) in <top (required)>'
2) #ordinalize works with negative numbers
Failure/Error: expect(ordinalize(number)).to eq ordinalized
expected: "-11th"
got: "-11st"
(compared using ==)
# /tmp/d20161027-13689-1ctk44j/spec.rb:4:in `block in expect_transformations'
# /tmp/d20161027-13689-1ctk44j/spec.rb:3:in `each'
# /tmp/d20161027-13689-1ctk44j/spec.rb:3:in `expect_transformations'
# /tmp/d20161027-13689-1ctk44j/spec.rb:54:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (2 levels) in <top (required)>'
Finished in 0.00326 seconds
5 examples, 2 failures
Failed examples:
rspec /tmp/d20161027-13689-1ctk44j/spec.rb:8 # #ordinalize adds 'th' to the cardinal number in the common case
rspec /tmp/d20161027-13689-1ctk44j/spec.rb:53 # #ordinalize works with negative numbers
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Виктор Клисуров
.....
Finished in 0.00332 seconds
5 examples, 0 failures
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Радослав Гайдаров
.....
Finished in 0.00336 seconds
5 examples, 0 failures
-
Некоректно
- 3 успешни тест(а)
- 2 неуспешни тест(а)
Ивайло Дончев
F..F.
Failures:
1) #ordinalize adds 'th' to the cardinal number in the common case
Failure/Error: expect(ordinalize(number)).to eq ordinalized
expected: "11th"
got: "11st"
(compared using ==)
# /tmp/d20161027-13689-avlmmo/spec.rb:4:in `block in expect_transformations'
# /tmp/d20161027-13689-avlmmo/spec.rb:3:in `each'
# /tmp/d20161027-13689-avlmmo/spec.rb:3:in `expect_transformations'
# /tmp/d20161027-13689-avlmmo/spec.rb:9:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (2 levels) in <top (required)>'
2) #ordinalize works with negative numbers
Failure/Error: expect(ordinalize(number)).to eq ordinalized
expected: "-11th"
got: "-11st"
(compared using ==)
# /tmp/d20161027-13689-avlmmo/spec.rb:4:in `block in expect_transformations'
# /tmp/d20161027-13689-avlmmo/spec.rb:3:in `each'
# /tmp/d20161027-13689-avlmmo/spec.rb:3:in `expect_transformations'
# /tmp/d20161027-13689-avlmmo/spec.rb:54:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:7:in `block (2 levels) in <top (required)>'
Finished in 0.00334 seconds
5 examples, 2 failures
Failed examples:
rspec /tmp/d20161027-13689-avlmmo/spec.rb:8 # #ordinalize adds 'th' to the cardinal number in the common case
rspec /tmp/d20161027-13689-avlmmo/spec.rb:53 # #ordinalize works with negative numbers
-
Коректно
- 5 успешни тест(а)
- 0 неуспешни тест(а)
Никола Младенов
.....
Finished in 0.00356 seconds
5 examples, 0 failures