.FF
Failures:
1) zig_zag works for n = 2
Failure/Error: zig_zag(2).should eq [[1, 2], [4, 3]]
expected: [[1, 2], [4, 3]]
got: [[1, 2], [nil, 4, 3]]
(compared using ==)
# /tmp/d20131016-4165-l34spf/spec.rb:7: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) zig_zag works for n = 10
Failure/Error: zig_zag(10).should eq [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
expected: [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [20, 19, 18, 17, 16, 15, 14, 13, 12, 11], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [40, 39, 38, 37, 36, 35, 34, 33, 32, 31], [41, 42, 43, 44, 45, 46, 47, 48, 49, 50], [60, 59, 58, 57, 56, 55, 54, 53, 52, 51], [61, 62, 63, 64, 65, 66, 67, 68, 69, 70], [80, 79, 78, 77, 76, 75, 74, 73, 72, 71], [81, 82, 83, 84, 85, 86, 87, 88, 89, 90], [100, 99, 98, 97, 96, 95, 94, 93, 92, 91]]
got: [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [nil, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [nil, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31], [41, 42, 43, 44, 45, 46, 47, 48, 49, 50], [nil, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51], [61, 62, 63, 64, 65, 66, 67, 68, 69, 70], [nil, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71], [81, 82, 83, 84, 85, 86, 87, 88, 89, 90], [nil, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91]]
(compared using ==)
# /tmp/d20131016-4165-l34spf/spec.rb:11: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.00546 seconds
3 examples, 2 failures
Failed examples:
rspec /tmp/d20131016-4165-l34spf/spec.rb:6 # zig_zag works for n = 2
rspec /tmp/d20131016-4165-l34spf/spec.rb:10 # zig_zag works for n = 10