Решение на Четвърта задача от Снежана Спасова
Обратно към всички решения
Към профила на Снежана Спасова
Резултати
- 3 точки от тестове
- 0 бонус точки
- 3 точки общо
- 6 успешни тест(а)
- 5 неуспешни тест(а)
Код
Лог от изпълнението
.F.F.F.F.F.
Failures:
1) Command Line Toolkit adding horizontal group does not change the behavior
Failure/Error: expect do
expected #<Proc:0xb9e025a4@/tmp/d20141126-26053-1hcij36/spec.rb:30> to render as " 123\n"
# /tmp/d20141126-26053-1hcij36/spec.rb:30:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
2) Command Line Toolkit handles complex group nestings
Failure/Error: horizontal do
NoMethodError:
undefined method `each' for "1\n2\n3\n4\n5\n6\n":String
# /tmp/d20141126-26053-1hcij36/solution.rb:31:in `horizontal'
# /tmp/d20141126-26053-1hcij36/solution.rb:56:in `horizontal'
# /tmp/d20141126-26053-1hcij36/spec.rb:64:in `block (6 levels) in <top (required)>'
# /tmp/d20141126-26053-1hcij36/solution.rb:51:in `instance_eval'
# /tmp/d20141126-26053-1hcij36/solution.rb:51:in `vertical'
# /tmp/d20141126-26053-1hcij36/spec.rb:62:in `block (5 levels) in <top (required)>'
# /tmp/d20141126-26053-1hcij36/solution.rb:56:in `instance_exec'
# /tmp/d20141126-26053-1hcij36/solution.rb:56:in `horizontal'
# /tmp/d20141126-26053-1hcij36/spec.rb:58:in `block (4 levels) in <top (required)>'
# /tmp/d20141126-26053-1hcij36/solution.rb:51:in `instance_eval'
# /tmp/d20141126-26053-1hcij36/solution.rb:51:in `vertical'
# /tmp/d20141126-26053-1hcij36/spec.rb:57:in `block (3 levels) in <top (required)>'
# /tmp/d20141126-26053-1hcij36/solution.rb:42:in `instance_eval'
# /tmp/d20141126-26053-1hcij36/solution.rb:42:in `draw'
# /tmp/d20141126-26053-1hcij36/spec.rb:8:in `block (3 levels) in <top (required)>'
# /tmp/d20141126-26053-1hcij36/spec.rb:56:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
3) Command Line Toolkit handles borders correctly in complex group nestings
Failure/Error: horizontal border: '|' do
NoMethodError:
undefined method `each' for "||1||\n||2||\n||3||\n||4||\n||5||\n||6||\n":String
# /tmp/d20141126-26053-1hcij36/solution.rb:31:in `horizontal'
# /tmp/d20141126-26053-1hcij36/solution.rb:56:in `horizontal'
# /tmp/d20141126-26053-1hcij36/spec.rb:107:in `block (6 levels) in <top (required)>'
# /tmp/d20141126-26053-1hcij36/solution.rb:51:in `instance_eval'
# /tmp/d20141126-26053-1hcij36/solution.rb:51:in `vertical'
# /tmp/d20141126-26053-1hcij36/spec.rb:105:in `block (5 levels) in <top (required)>'
# /tmp/d20141126-26053-1hcij36/solution.rb:56:in `instance_exec'
# /tmp/d20141126-26053-1hcij36/solution.rb:56:in `horizontal'
# /tmp/d20141126-26053-1hcij36/spec.rb:101:in `block (4 levels) in <top (required)>'
# /tmp/d20141126-26053-1hcij36/solution.rb:51:in `instance_eval'
# /tmp/d20141126-26053-1hcij36/solution.rb:51:in `vertical'
# /tmp/d20141126-26053-1hcij36/spec.rb:100:in `block (3 levels) in <top (required)>'
# /tmp/d20141126-26053-1hcij36/solution.rb:42:in `instance_eval'
# /tmp/d20141126-26053-1hcij36/solution.rb:42:in `draw'
# /tmp/d20141126-26053-1hcij36/spec.rb:8:in `block (3 levels) in <top (required)>'
# /tmp/d20141126-26053-1hcij36/spec.rb:99:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
4) Command Line Toolkit propagates upcase to child components
Failure/Error: horizontal do
NoMethodError:
undefined method `each' for #<String:0xb9dd8c18>
# /tmp/d20141126-26053-1hcij36/solution.rb:31:in `horizontal'
# /tmp/d20141126-26053-1hcij36/solution.rb:56:in `horizontal'
# /tmp/d20141126-26053-1hcij36/spec.rb:144:in `block (5 levels) in <top (required)>'
# /tmp/d20141126-26053-1hcij36/solution.rb:51:in `instance_eval'
# /tmp/d20141126-26053-1hcij36/solution.rb:51:in `vertical'
# /tmp/d20141126-26053-1hcij36/spec.rb:142:in `block (4 levels) in <top (required)>'
# /tmp/d20141126-26053-1hcij36/solution.rb:56:in `instance_exec'
# /tmp/d20141126-26053-1hcij36/solution.rb:56:in `horizontal'
# /tmp/d20141126-26053-1hcij36/spec.rb:138:in `block (3 levels) in <top (required)>'
# /tmp/d20141126-26053-1hcij36/solution.rb:42:in `instance_eval'
# /tmp/d20141126-26053-1hcij36/solution.rb:42:in `draw'
# /tmp/d20141126-26053-1hcij36/spec.rb:8:in `block (3 levels) in <top (required)>'
# /tmp/d20141126-26053-1hcij36/spec.rb:137:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
5) Command Line Toolkit propagates downcase to child components
Failure/Error: horizontal do
NoMethodError:
undefined method `each' for #<String:0xb9dccfa8>
# /tmp/d20141126-26053-1hcij36/solution.rb:31:in `horizontal'
# /tmp/d20141126-26053-1hcij36/solution.rb:56:in `horizontal'
# /tmp/d20141126-26053-1hcij36/spec.rb:179:in `block (5 levels) in <top (required)>'
# /tmp/d20141126-26053-1hcij36/solution.rb:51:in `instance_eval'
# /tmp/d20141126-26053-1hcij36/solution.rb:51:in `vertical'
# /tmp/d20141126-26053-1hcij36/spec.rb:177:in `block (4 levels) in <top (required)>'
# /tmp/d20141126-26053-1hcij36/solution.rb:56:in `instance_exec'
# /tmp/d20141126-26053-1hcij36/solution.rb:56:in `horizontal'
# /tmp/d20141126-26053-1hcij36/spec.rb:173:in `block (3 levels) in <top (required)>'
# /tmp/d20141126-26053-1hcij36/solution.rb:42:in `instance_eval'
# /tmp/d20141126-26053-1hcij36/solution.rb:42:in `draw'
# /tmp/d20141126-26053-1hcij36/spec.rb:8:in `block (3 levels) in <top (required)>'
# /tmp/d20141126-26053-1hcij36/spec.rb:172:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.01981 seconds
11 examples, 5 failures
Failed examples:
rspec /tmp/d20141126-26053-1hcij36/spec.rb:29 # Command Line Toolkit adding horizontal group does not change the behavior
rspec /tmp/d20141126-26053-1hcij36/spec.rb:55 # Command Line Toolkit handles complex group nestings
rspec /tmp/d20141126-26053-1hcij36/spec.rb:98 # Command Line Toolkit handles borders correctly in complex group nestings
rspec /tmp/d20141126-26053-1hcij36/spec.rb:136 # Command Line Toolkit propagates upcase to child components
rspec /tmp/d20141126-26053-1hcij36/spec.rb:171 # Command Line Toolkit propagates downcase to child components
История (4 версии и 0 коментара)
Снежана обнови решението на 26.11.2014 03:23 (преди почти 10 години)
Снежана обнови решението на 26.11.2014 03:24 (преди почти 10 години)
Снежана обнови решението на 26.11.2014 03:26 (преди почти 10 години)
Снежана обнови решението на 26.11.2014 03:27 (преди почти 10 години)