Решение на Четвърта задача от Любомир Иванов
Обратно към всички решения
Към профила на Любомир Иванов
Резултати
- 1 точка от тестове
- 0 бонус точки
- 1 точка общо
- 1 успешни тест(а)
- 10 неуспешни тест(а)
Код
Лог от изпълнението
FFFFFFFFFF.
Failures:
1) Command Line Toolkit arranges components horizontally by default
Failure/Error: label text: '1'
NoMethodError:
undefined method `counter_of_words' for UI::TextScreen:Class
# /tmp/d20141126-26053-1nj3c7z/solution.rb:61:in `final_operations'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:9:in `label'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:21:in `block (3 levels) in <top (required)>'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:48:in `instance_eval'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:48:in `draw'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:8:in `block (3 levels) in <top (required)>'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:20: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 adding horizontal group does not change the behavior
Failure/Error: label text: '1'
NoMethodError:
undefined method `counter_of_words' for UI::TextScreen:Class
# /tmp/d20141126-26053-1nj3c7z/solution.rb:61:in `final_operations'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:9:in `label'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:32:in `block (4 levels) in <top (required)>'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:38:in `instance_eval'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:38:in `horizontal'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:31:in `block (3 levels) in <top (required)>'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:48:in `instance_eval'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:48:in `draw'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:8:in `block (3 levels) in <top (required)>'
# /tmp/d20141126-26053-1nj3c7z/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)>'
3) Command Line Toolkit verical group orders elements vertically
Failure/Error: label text: '1'
NoMethodError:
undefined method `counter_of_words' for UI::TextScreen:Class
# /tmp/d20141126-26053-1nj3c7z/solution.rb:61:in `final_operations'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:9:in `label'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:44:in `block (4 levels) in <top (required)>'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:33:in `instance_eval'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:33:in `vertical'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:43:in `block (3 levels) in <top (required)>'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:48:in `instance_eval'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:48:in `draw'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:8:in `block (3 levels) in <top (required)>'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:42: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 handles complex group nestings
Failure/Error: label text: '1'
NoMethodError:
undefined method `counter_of_words' for UI::TextScreen:Class
# /tmp/d20141126-26053-1nj3c7z/solution.rb:61:in `final_operations'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:9:in `label'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:59:in `block (5 levels) in <top (required)>'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:38:in `instance_eval'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:38:in `horizontal'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:58:in `block (4 levels) in <top (required)>'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:33:in `instance_eval'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:33:in `vertical'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:57:in `block (3 levels) in <top (required)>'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:48:in `instance_eval'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:48:in `draw'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:8:in `block (3 levels) in <top (required)>'
# /tmp/d20141126-26053-1nj3c7z/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)>'
5) Command Line Toolkit wraps vertically-aligned components correctly in border
Failure/Error: label text: 'something'
NoMethodError:
undefined method `counter_of_words' for UI::TextScreen:Class
# /tmp/d20141126-26053-1nj3c7z/solution.rb:61:in `final_operations'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:9:in `label'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:87:in `block (4 levels) in <top (required)>'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:33:in `instance_eval'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:33:in `vertical'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:86:in `block (3 levels) in <top (required)>'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:48:in `instance_eval'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:48:in `draw'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:8:in `block (3 levels) in <top (required)>'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:85: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)>'
6) Command Line Toolkit handles borders correctly in complex group nestings
Failure/Error: label text: '1', border: '|'
NoMethodError:
undefined method `counter_of_words' for UI::TextScreen:Class
# /tmp/d20141126-26053-1nj3c7z/solution.rb:61:in `final_operations'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:9:in `label'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:102:in `block (5 levels) in <top (required)>'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:38:in `instance_eval'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:38:in `horizontal'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:101:in `block (4 levels) in <top (required)>'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:33:in `instance_eval'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:33:in `vertical'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:100:in `block (3 levels) in <top (required)>'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:48:in `instance_eval'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:48:in `draw'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:8:in `block (3 levels) in <top (required)>'
# /tmp/d20141126-26053-1nj3c7z/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)>'
7) Command Line Toolkit applies upcase to simple components
Failure/Error: label text: 'some', style: :upcase
NoMethodError:
undefined method `counter_of_words' for UI::TextScreen:Class
# /tmp/d20141126-26053-1nj3c7z/solution.rb:61:in `final_operations'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:9:in `label'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:129:in `block (3 levels) in <top (required)>'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:48:in `instance_eval'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:48:in `draw'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:8:in `block (3 levels) in <top (required)>'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:128: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)>'
8) Command Line Toolkit propagates upcase to child components
Failure/Error: label text: 'some'
NoMethodError:
undefined method `counter_of_words' for UI::TextScreen:Class
# /tmp/d20141126-26053-1nj3c7z/solution.rb:61:in `final_operations'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:9:in `label'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:139:in `block (4 levels) in <top (required)>'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:38:in `instance_eval'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:38:in `horizontal'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:138:in `block (3 levels) in <top (required)>'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:48:in `instance_eval'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:48:in `draw'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:8:in `block (3 levels) in <top (required)>'
# /tmp/d20141126-26053-1nj3c7z/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)>'
9) Command Line Toolkit applies downcase to simple components
Failure/Error: label text: 'SOME'
NoMethodError:
undefined method `counter_of_words' for UI::TextScreen:Class
# /tmp/d20141126-26053-1nj3c7z/solution.rb:61:in `final_operations'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:9:in `label'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:164:in `block (3 levels) in <top (required)>'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:48:in `instance_eval'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:48:in `draw'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:8:in `block (3 levels) in <top (required)>'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:163: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)>'
10) Command Line Toolkit propagates downcase to child components
Failure/Error: label text: 'SOME'
NoMethodError:
undefined method `counter_of_words' for UI::TextScreen:Class
# /tmp/d20141126-26053-1nj3c7z/solution.rb:61:in `final_operations'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:9:in `label'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:174:in `block (4 levels) in <top (required)>'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:38:in `instance_eval'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:38:in `horizontal'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:173:in `block (3 levels) in <top (required)>'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:48:in `instance_eval'
# /tmp/d20141126-26053-1nj3c7z/solution.rb:48:in `draw'
# /tmp/d20141126-26053-1nj3c7z/spec.rb:8:in `block (3 levels) in <top (required)>'
# /tmp/d20141126-26053-1nj3c7z/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.01683 seconds
11 examples, 10 failures
Failed examples:
rspec /tmp/d20141126-26053-1nj3c7z/spec.rb:19 # Command Line Toolkit arranges components horizontally by default
rspec /tmp/d20141126-26053-1nj3c7z/spec.rb:29 # Command Line Toolkit adding horizontal group does not change the behavior
rspec /tmp/d20141126-26053-1nj3c7z/spec.rb:41 # Command Line Toolkit verical group orders elements vertically
rspec /tmp/d20141126-26053-1nj3c7z/spec.rb:55 # Command Line Toolkit handles complex group nestings
rspec /tmp/d20141126-26053-1nj3c7z/spec.rb:84 # Command Line Toolkit wraps vertically-aligned components correctly in border
rspec /tmp/d20141126-26053-1nj3c7z/spec.rb:98 # Command Line Toolkit handles borders correctly in complex group nestings
rspec /tmp/d20141126-26053-1nj3c7z/spec.rb:127 # Command Line Toolkit applies upcase to simple components
rspec /tmp/d20141126-26053-1nj3c7z/spec.rb:136 # Command Line Toolkit propagates upcase to child components
rspec /tmp/d20141126-26053-1nj3c7z/spec.rb:162 # Command Line Toolkit applies downcase to simple components
rspec /tmp/d20141126-26053-1nj3c7z/spec.rb:171 # Command Line Toolkit propagates downcase to child components
История (2 версии и 0 коментара)
Любомир обнови решението на 26.11.2014 16:37 (преди почти 10 години)
Любомир обнови решението на 26.11.2014 16:55 (преди почти 10 години)