Решение на Трета задача от Емилиан Станков
Обратно към всички решения
Към профила на Емилиан Станков
Резултати
- 5 точки от тестове
- 0 бонус точки
- 5 точки общо
- 40 успешни тест(а)
- 4 неуспешни тест(а)
Код
Лог от изпълнението
..........FFFF..............................
Failures:
1) RBFS Directory serialization ::parse can parse empty directories
Failure/Error: expect(parsed_directory.files ).to eq({})
NoMethodError:
undefined method `files' for nil:NilClass
# /tmp/d20141111-26053-1txlq7u/spec.rb:103:in `block (5 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) RBFS Directory serialization ::parse can parse directories with files
Failure/Error: expect(parsed_directory.files.size ).to eq 2
NoMethodError:
undefined method `files' for nil:NilClass
# /tmp/d20141111-26053-1txlq7u/spec.rb:110:in `block (5 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) RBFS Directory serialization ::parse can parse directory trees without files
Failure/Error: expect(parsed_directory['dir1'] ).to be_an RBFS::Directory
NoMethodError:
undefined method `[]' for nil:NilClass
# /tmp/d20141111-26053-1txlq7u/spec.rb:119:in `block (5 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) RBFS Directory serialization ::parse can parse directories recursively
Failure/Error: expect(parsed_directory.files.size ).to eq 2
NoMethodError:
undefined method `files' for nil:NilClass
# /tmp/d20141111-26053-1txlq7u/spec.rb:127:in `block (5 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.0418 seconds
44 examples, 4 failures
Failed examples:
rspec /tmp/d20141111-26053-1txlq7u/spec.rb:100 # RBFS Directory serialization ::parse can parse empty directories
rspec /tmp/d20141111-26053-1txlq7u/spec.rb:107 # RBFS Directory serialization ::parse can parse directories with files
rspec /tmp/d20141111-26053-1txlq7u/spec.rb:116 # RBFS Directory serialization ::parse can parse directory trees without files
rspec /tmp/d20141111-26053-1txlq7u/spec.rb:124 # RBFS Directory serialization ::parse can parse directories recursively
История (3 версии и 3 коментара)
Емилиан обнови решението на 31.10.2014 13:34 (преди около 10 години)
Емилиан обнови решението на 31.10.2014 18:44 (преди около 10 години)
Емилиан обнови решението на 06.11.2014 17:01 (преди около 10 години)