Решение на Седма задача - ретроспекция от Лазар Дилов
Обратно към всички решения
Към профила на Лазар Дилов
Резултати
- 0 точки от тестове
- 1 бонус точка
- 1 точка общо
- 0 успешни тест(а)
- 1 неуспешни тест(а)
Код
Лог от изпълнението
From https://github.com/fmi/ruby-retrospective-2016
* branch master -> FETCH_HEAD
HEAD is now at a22cf37 Set rubocop version to 0.46.0 to fix obsolete cop errors
Cloning into 'submission'...
HEAD is now at 40179bc HashShtore is reworked and fixed
From /tmp/ruby-retrospective-2016/checker
* branch master -> FETCH_HEAD
* [new branch] master -> upstream/master
Changes URL:
https://github.com/ldilov/ruby-retrospective-2016/compare/1f710b00c26...40179bc1d4f
'tasks/1/solution.rb' -> '/tmp/ruby-retrospective-2016/checker/tasks/1/solution.rb'
'tasks/2/solution.rb' -> '/tmp/ruby-retrospective-2016/checker/tasks/2/solution.rb'
'tasks/3/solution.rb' -> '/tmp/ruby-retrospective-2016/checker/tasks/3/solution.rb'
'tasks/4/solution.rb' -> '/tmp/ruby-retrospective-2016/checker/tasks/4/solution.rb'
'tasks/5/solution.rb' -> '/tmp/ruby-retrospective-2016/checker/tasks/5/solution.rb'
Inspecting 1 file
.
1 file inspected, no offenses detected
.................
Finished in 0.00467 seconds
17 examples, 0 failures
Inspecting 1 file
.
1 file inspected, no offenses detected
...............
Finished in 0.00529 seconds
15 examples, 0 failures
Inspecting 1 file
.
1 file inspected, no offenses detected
...............
Finished in 0.00779 seconds
15 examples, 0 failures
Inspecting 1 file
.
1 file inspected, no offenses detected
....................
Finished in 19.29 seconds
20 examples, 0 failures
Inspecting 1 file
.
1 file inspected, no offenses detected
....FFF.....FFF..........
Failures:
1) DataModel id generation creates id on first save and does not change it
Failure/Error: expect(record.id).to eq 1
expected: 1
got: 2
(compared using ==)
# ./spec.rb:54:in `block (3 levels) in <top (required)>'
2) DataModel id generation does not reuse ids
Failure/Error: expect(ivan.id).to eq 1
expected: 1
got: 3
(compared using ==)
# ./spec.rb:65:in `block (3 levels) in <top (required)>'
3) DataModel id generation does not break when there are two models with the same store
Failure/Error: expect(ivan.id).to eq 1
expected: 1
got: 4
(compared using ==)
# ./spec.rb:83:in `block (3 levels) in <top (required)>'
4) DataModel.where raises an error if the query is by an unknown key
Failure/Error: DataModel::UnknownAttributeError,
NameError:
uninitialized constant DataModel::UnknownAttributeError
# ./spec.rb:144:in `block (3 levels) in <top (required)>'
5) DataModel#delete deletes only the record for which it is called
Failure/Error: ivan.delete
NoMethodError:
undefined method `delete' for #<#<Class:0x00563bff8b7658>:0x00563bff8bffb0>
# ./spec.rb:156:in `block (3 levels) in <top (required)>'
6) DataModel#delete raises an error if the record is not saved
Failure/Error: DataModel::DeleteUnsavedRecordError
NameError:
uninitialized constant DataModel::DeleteUnsavedRecordError
# ./spec.rb:164:in `block (3 levels) in <top (required)>'
Finished in 0.03987 seconds
25 examples, 6 failures
Failed examples:
rspec ./spec.rb:48 # DataModel id generation creates id on first save and does not change it
rspec ./spec.rb:62 # DataModel id generation does not reuse ids
rspec ./spec.rb:74 # DataModel id generation does not break when there are two models with the same store
rspec ./spec.rb:142 # DataModel.where raises an error if the query is by an unknown key
rspec ./spec.rb:151 # DataModel#delete deletes only the record for which it is called
rspec ./spec.rb:162 # DataModel#delete raises an error if the record is not saved
F
Failures:
1) ruby-retrospective-2016 covers the minimum requirements
Failure/Error: system(command) or raise "Command failed for #{@solutions_repo}: #{command}"
RuntimeError:
Command failed for https://github.com/ldilov/ruby-retrospective-2016: bundle exec rake check_all
# /tmp/d20170211-11010-ot8vq0/spec.rb:82:in `execute'
# /tmp/d20170211-11010-ot8vq0/spec.rb:75:in `block (3 levels) in solutions_pass_all_checks'
# /tmp/d20170211-11010-ot8vq0/spec.rb:74:in `chdir'
# /tmp/d20170211-11010-ot8vq0/spec.rb:74:in `block (2 levels) in solutions_pass_all_checks'
# /tmp/d20170211-11010-ot8vq0/spec.rb:40:in `chdir'
# /tmp/d20170211-11010-ot8vq0/spec.rb:40:in `block in solutions_pass_all_checks'
# /tmp/d20170211-11010-ot8vq0/spec.rb:39:in `solutions_pass_all_checks'
# /tmp/d20170211-11010-ot8vq0/spec.rb:19:in `ok?'
# /tmp/d20170211-11010-ot8vq0/spec.rb:101:in `<top (required)>'
Finished in 0.00088 seconds
1 example, 1 failure
Failed examples:
rspec /tmp/d20170211-11010-ot8vq0/spec.rb:107 # ruby-retrospective-2016 covers the minimum requirements
История (1 версия и 0 коментара)
Лазар обнови решението на 15.01.2017 22:26 (преди почти 8 години)