Решение на Шеста задача от Георги Лозев
Обратно към всички решения
Към профила на Георги Лозев
Резултати
- 5 точки от тестове
- 0 бонус точки
- 5 точки общо
- 14 успешни тест(а)
- 4 неуспешни тест(а)
Код
Лог от изпълнението
..F............FFF
Failures:
1) GameOfLife::Board enumeration responds to each, map, count, etc.
Failure/Error: board.should respond_to(enumerable_method)
expected #<GameOfLife::Board:0x94ab704 @grid={}, @next_grid={}> to respond to :each_cons
# /tmp/d20111221-3114-1aq9kss/spec.rb:19:in `block (4 levels) in <top (required)>'
# /tmp/d20111221-3114-1aq9kss/spec.rb:18:in `each'
# /tmp/d20111221-3114-1aq9kss/spec.rb:18:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
2) GameOfLife::Board GameOfLife::Board evolution rules evolves a formation correctly
Failure/Error: (board.to_a - cells).should eq []
NoMethodError:
undefined method `to_a' for #<GameOfLife::Board:0x9628960>
# /tmp/d20111221-3114-1aq9kss/spec.rb:173:in `expect_generation_in'
# /tmp/d20111221-3114-1aq9kss/spec.rb:136:in `block (4 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
3) GameOfLife::Board GameOfLife::Board evolution rules oscilates the oscilators
Failure/Error: (board.to_a - cells).should eq []
NoMethodError:
undefined method `to_a' for #<GameOfLife::Board:0x962d8c0>
# /tmp/d20111221-3114-1aq9kss/spec.rb:173:in `expect_generation_in'
# /tmp/d20111221-3114-1aq9kss/spec.rb:145:in `block (5 levels) in <top (required)>'
# /tmp/d20111221-3114-1aq9kss/spec.rb:142:in `times'
# /tmp/d20111221-3114-1aq9kss/spec.rb:142:in `block (4 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
4) GameOfLife::Board GameOfLife::Board evolution rules keeps stable formations stable
Failure/Error: (board.to_a - cells).should eq []
NoMethodError:
undefined method `to_a' for #<GameOfLife::Board:0x96dcbcc>
# /tmp/d20111221-3114-1aq9kss/spec.rb:173:in `expect_generation_in'
# /tmp/d20111221-3114-1aq9kss/spec.rb:160:in `block (6 levels) in <top (required)>'
# /tmp/d20111221-3114-1aq9kss/spec.rb:158:in `times'
# /tmp/d20111221-3114-1aq9kss/spec.rb:158:in `block (5 levels) in <top (required)>'
# /tmp/d20111221-3114-1aq9kss/spec.rb:155:in `each'
# /tmp/d20111221-3114-1aq9kss/spec.rb:155:in `block (4 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.33354 seconds
18 examples, 4 failures
Failed examples:
rspec /tmp/d20111221-3114-1aq9kss/spec.rb:15 # GameOfLife::Board enumeration responds to each, map, count, etc.
rspec /tmp/d20111221-3114-1aq9kss/spec.rb:129 # GameOfLife::Board GameOfLife::Board evolution rules evolves a formation correctly
rspec /tmp/d20111221-3114-1aq9kss/spec.rb:139 # GameOfLife::Board GameOfLife::Board evolution rules oscilates the oscilators
rspec /tmp/d20111221-3114-1aq9kss/spec.rb:151 # GameOfLife::Board GameOfLife::Board evolution rules keeps stable formations stable
История (1 версия и 0 коментара)
Георги обнови решението на 19.12.2011 23:54 (преди около 13 години)