Решение на Втора задача - хешове, масиви и структура от Мартин Христов
Обратно към всички решения
Към профила на Мартин Христов
Резултати
- 5 точки от тестове
- 0 бонус точки
- 5 точки общо
- 12 успешни тест(а)
- 3 неуспешни тест(а)
Код
Лог от изпълнението
F....F.F.......
Failures:
1) Task 2 README works for all examples
Failure/Error: expect(dessert.fetch_deep('variant')).to eq('chocolate')
expected: "chocolate"
got: nil
(compared using ==)
# /tmp/d20161024-13689-1ykvgjy/spec.rb:25:in `block (3 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) Task 2 Hash#fetch_deep is indifferent to symbols and strings
Failure/Error: expect(input.fetch_deep('dessert')).to eq 'ice cream'
expected: "ice cream"
got: nil
(compared using ==)
# /tmp/d20161024-13689-1ykvgjy/spec.rb:96:in `block (3 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) Task 2 Hash#fetch_deep can fetch integer-like keys from hashes
Failure/Error: expect(input.fetch_deep('nested.2')).to eq :b
expected: :b
got: nil
(compared using ==)
# /tmp/d20161024-13689-1ykvgjy/spec.rb:112:in `block (3 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.00823 seconds
15 examples, 3 failures
Failed examples:
rspec /tmp/d20161024-13689-1ykvgjy/spec.rb:3 # Task 2 README works for all examples
rspec /tmp/d20161024-13689-1ykvgjy/spec.rb:92 # Task 2 Hash#fetch_deep is indifferent to symbols and strings
rspec /tmp/d20161024-13689-1ykvgjy/spec.rb:108 # Task 2 Hash#fetch_deep can fetch integer-like keys from hashes
История (2 версии и 0 коментара)
Мартин обнови решението на 19.10.2016 13:23 (преди около 8 години)
Мартин обнови решението на 23.10.2016 18:49 (преди около 8 години)