Решение на Седма задача от Клара Кайралах
Обратно към всички решения
Към профила на Клара Кайралах
Резултати
- 2 точки от тестове
- 0 бонус точки
- 2 точки общо
- 9 успешни тест(а)
- 22 неуспешни тест(а)
Код
Лог от изпълнението
....F.F.F.F.FFFFFFFFFFFFFFFFF.F
Failures:
1) LazyMode LazyMode::Note has header
Failure/Error: expect(file.notes.first.header).to eq('todo_list')
expected: "todo_list"
got: "one"
(compared using ==)
# /tmp/d20160107-5693-c5flop/spec.rb:35:in `block (3 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) LazyMode LazyMode::Note #tags has tags
Failure/Error: expect(file.notes.first.tags).to eq([:important, :wip, :blocker])
expected: [:important, :wip, :blocker]
got: []
(compared using ==)
Diff:
@@ -1,2 +1,2 @@
-[:important, :wip, :blocker]
+[]
# /tmp/d20160107-5693-c5flop/spec.rb:45:in `block (4 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) LazyMode LazyMode::Note #status has status
Failure/Error: expect(file.notes.first.status).to eq(:postponed)
expected: :postponed
got: :topostpone
(compared using ==)
Diff:
@@ -1,2 +1,2 @@
-:postponed
+:topostpone
# /tmp/d20160107-5693-c5flop/spec.rb:65:in `block (4 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) LazyMode LazyMode::Note #body has body
Failure/Error: expect(file.notes.first.body).to eq('Do not forget to...')
expected: "Do not forget to..."
got: ""
(compared using ==)
# /tmp/d20160107-5693-c5flop/spec.rb:85:in `block (4 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) LazyMode#daily_agenda returns note scheduled without repeater
Failure/Error: agenda = file.daily_agenda(LazyMode::Date.new('2012-12-12'))
NoMethodError:
undefined method `is_equal_notes' for LazyMode::Note:Class
# /tmp/d20160107-5693-c5flop/solution.rb:165:in `block in get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `each'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:85:in `daily_agenda'
# /tmp/d20160107-5693-c5flop/spec.rb:130:in `block (3 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) LazyMode#daily_agenda returns note scheduled with daily repeater
Failure/Error: agenda = file.daily_agenda(LazyMode::Date.new('2012-12-12'))
NoMethodError:
undefined method `is_equal_notes' for LazyMode::Note:Class
# /tmp/d20160107-5693-c5flop/solution.rb:165:in `block in get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `each'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:85:in `daily_agenda'
# /tmp/d20160107-5693-c5flop/spec.rb:152:in `block (3 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) LazyMode#daily_agenda returns note scheduled with weekly repeater
Failure/Error: agenda = file.daily_agenda(LazyMode::Date.new('2012-12-12'))
NoMethodError:
undefined method `is_equal_notes' for LazyMode::Note:Class
# /tmp/d20160107-5693-c5flop/solution.rb:165:in `block in get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `each'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:85:in `daily_agenda'
# /tmp/d20160107-5693-c5flop/spec.rb:174:in `block (3 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) LazyMode#daily_agenda returns note scheduled with monthly repeater
Failure/Error: agenda = file.daily_agenda(LazyMode::Date.new('2013-01-12'))
NoMethodError:
undefined method `is_equal_notes' for LazyMode::Note:Class
# /tmp/d20160107-5693-c5flop/solution.rb:165:in `block in get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `each'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:85:in `daily_agenda'
# /tmp/d20160107-5693-c5flop/spec.rb:197:in `block (3 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) LazyMode#daily_agenda does not return note whose start date is in the future
Failure/Error: agenda = file.daily_agenda(LazyMode::Date.new('2012-10-12'))
NoMethodError:
undefined method `is_equal_notes' for LazyMode::Note:Class
# /tmp/d20160107-5693-c5flop/solution.rb:165:in `block in get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `each'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:85:in `daily_agenda'
# /tmp/d20160107-5693-c5flop/spec.rb:215:in `block (3 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) LazyMode#daily_agenda returns nested notes
Failure/Error: agenda = file.daily_agenda(LazyMode::Date.new('2012-08-06'))
NoMethodError:
undefined method `is_equal_notes' for LazyMode::Note:Class
# /tmp/d20160107-5693-c5flop/solution.rb:165:in `block in get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `each'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:85:in `daily_agenda'
# /tmp/d20160107-5693-c5flop/spec.rb:230:in `block (3 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)>'
11) LazyMode#weekly_agenda returns note scheduled without repeater
Failure/Error: agenda = file.weekly_agenda(LazyMode::Date.new('2012-12-06'))
NoMethodError:
undefined method `is_equal_notes' for LazyMode::Note:Class
# /tmp/d20160107-5693-c5flop/solution.rb:165:in `block in get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `each'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:92:in `block in weekly_agenda'
# /tmp/d20160107-5693-c5flop/solution.rb:91:in `times'
# /tmp/d20160107-5693-c5flop/solution.rb:91:in `weekly_agenda'
# /tmp/d20160107-5693-c5flop/spec.rb:248:in `block (3 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)>'
12) LazyMode#weekly_agenda returns multiple notes with different dates when scheduled with daily repeater
Failure/Error: agenda = file.weekly_agenda(LazyMode::Date.new('2012-12-06'))
NoMethodError:
undefined method `is_equal_notes' for LazyMode::Note:Class
# /tmp/d20160107-5693-c5flop/solution.rb:165:in `block in get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `each'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:92:in `block in weekly_agenda'
# /tmp/d20160107-5693-c5flop/solution.rb:91:in `times'
# /tmp/d20160107-5693-c5flop/solution.rb:91:in `weekly_agenda'
# /tmp/d20160107-5693-c5flop/spec.rb:270:in `block (3 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)>'
13) LazyMode#weekly_agenda returns note scheduled with weekly repeater
Failure/Error: agenda = file.weekly_agenda(LazyMode::Date.new('2012-12-10'))
NoMethodError:
undefined method `is_equal_notes' for LazyMode::Note:Class
# /tmp/d20160107-5693-c5flop/solution.rb:165:in `block in get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `each'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:92:in `block in weekly_agenda'
# /tmp/d20160107-5693-c5flop/solution.rb:91:in `times'
# /tmp/d20160107-5693-c5flop/solution.rb:91:in `weekly_agenda'
# /tmp/d20160107-5693-c5flop/spec.rb:294:in `block (3 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)>'
14) LazyMode#weekly_agenda returns note scheduled with monthly repeater
Failure/Error: agenda = file.weekly_agenda(LazyMode::Date.new('2013-01-10'))
NoMethodError:
undefined method `is_equal_notes' for LazyMode::Note:Class
# /tmp/d20160107-5693-c5flop/solution.rb:165:in `block in get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `each'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:92:in `block in weekly_agenda'
# /tmp/d20160107-5693-c5flop/solution.rb:91:in `times'
# /tmp/d20160107-5693-c5flop/solution.rb:91:in `weekly_agenda'
# /tmp/d20160107-5693-c5flop/spec.rb:326:in `block (3 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)>'
15) LazyMode#weekly_agenda does not return note whose start date is in the future
Failure/Error: agenda = file.weekly_agenda(LazyMode::Date.new('2012-10-12'))
NoMethodError:
undefined method `is_equal_notes' for LazyMode::Note:Class
# /tmp/d20160107-5693-c5flop/solution.rb:165:in `block in get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `each'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:92:in `block in weekly_agenda'
# /tmp/d20160107-5693-c5flop/solution.rb:91:in `times'
# /tmp/d20160107-5693-c5flop/solution.rb:91:in `weekly_agenda'
# /tmp/d20160107-5693-c5flop/spec.rb:344:in `block (3 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)>'
16) LazyMode#weekly_agenda returns nested notes
Failure/Error: agenda = file.weekly_agenda(LazyMode::Date.new('2012-09-05'))
NoMethodError:
undefined method `is_equal_notes' for LazyMode::Note:Class
# /tmp/d20160107-5693-c5flop/solution.rb:165:in `block in get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `each'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:92:in `block in weekly_agenda'
# /tmp/d20160107-5693-c5flop/solution.rb:91:in `times'
# /tmp/d20160107-5693-c5flop/solution.rb:91:in `weekly_agenda'
# /tmp/d20160107-5693-c5flop/spec.rb:359:in `block (3 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)>'
17) LazyMode#where filters by tag
Failure/Error: @agenda = file.daily_agenda(LazyMode::Date.new('2012-12-12'))
NoMethodError:
undefined method `is_equal_notes' for LazyMode::Note:Class
# /tmp/d20160107-5693-c5flop/solution.rb:165:in `block in get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `each'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:85:in `daily_agenda'
# /tmp/d20160107-5693-c5flop/spec.rb:387:in `block (3 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)>'
18) LazyMode#where filters by body text
Failure/Error: @agenda = file.daily_agenda(LazyMode::Date.new('2012-12-12'))
NoMethodError:
undefined method `is_equal_notes' for LazyMode::Note:Class
# /tmp/d20160107-5693-c5flop/solution.rb:165:in `block in get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `each'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:85:in `daily_agenda'
# /tmp/d20160107-5693-c5flop/spec.rb:387:in `block (3 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)>'
19) LazyMode#where filters by header text
Failure/Error: @agenda = file.daily_agenda(LazyMode::Date.new('2012-12-12'))
NoMethodError:
undefined method `is_equal_notes' for LazyMode::Note:Class
# /tmp/d20160107-5693-c5flop/solution.rb:165:in `block in get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `each'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:85:in `daily_agenda'
# /tmp/d20160107-5693-c5flop/spec.rb:387:in `block (3 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)>'
20) LazyMode#where filters by status
Failure/Error: @agenda = file.daily_agenda(LazyMode::Date.new('2012-12-12'))
NoMethodError:
undefined method `is_equal_notes' for LazyMode::Note:Class
# /tmp/d20160107-5693-c5flop/solution.rb:165:in `block in get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `each'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:85:in `daily_agenda'
# /tmp/d20160107-5693-c5flop/spec.rb:387:in `block (3 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)>'
21) LazyMode#where filters by multiple filters
Failure/Error: @agenda = file.daily_agenda(LazyMode::Date.new('2012-12-12'))
NoMethodError:
undefined method `is_equal_notes' for LazyMode::Note:Class
# /tmp/d20160107-5693-c5flop/solution.rb:165:in `block in get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `each'
# /tmp/d20160107-5693-c5flop/solution.rb:164:in `get_notes'
# /tmp/d20160107-5693-c5flop/solution.rb:85:in `daily_agenda'
# /tmp/d20160107-5693-c5flop/spec.rb:387:in `block (3 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)>'
22) LazyMode.create_file can build notes in the block
Failure/Error: expect(file.notes.size).to eq(3)
expected: 3
got: 52
(compared using ==)
# /tmp/d20160107-5693-c5flop/spec.rb:477:in `block (3 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.01833 seconds
31 examples, 22 failures
Failed examples:
rspec /tmp/d20160107-5693-c5flop/spec.rb:29 # LazyMode LazyMode::Note has header
rspec /tmp/d20160107-5693-c5flop/spec.rb:39 # LazyMode LazyMode::Note #tags has tags
rspec /tmp/d20160107-5693-c5flop/spec.rb:59 # LazyMode LazyMode::Note #status has status
rspec /tmp/d20160107-5693-c5flop/spec.rb:79 # LazyMode LazyMode::Note #body has body
rspec /tmp/d20160107-5693-c5flop/spec.rb:119 # LazyMode#daily_agenda returns note scheduled without repeater
rspec /tmp/d20160107-5693-c5flop/spec.rb:141 # LazyMode#daily_agenda returns note scheduled with daily repeater
rspec /tmp/d20160107-5693-c5flop/spec.rb:163 # LazyMode#daily_agenda returns note scheduled with weekly repeater
rspec /tmp/d20160107-5693-c5flop/spec.rb:186 # LazyMode#daily_agenda returns note scheduled with monthly repeater
rspec /tmp/d20160107-5693-c5flop/spec.rb:208 # LazyMode#daily_agenda does not return note whose start date is in the future
rspec /tmp/d20160107-5693-c5flop/spec.rb:219 # LazyMode#daily_agenda returns nested notes
rspec /tmp/d20160107-5693-c5flop/spec.rb:237 # LazyMode#weekly_agenda returns note scheduled without repeater
rspec /tmp/d20160107-5693-c5flop/spec.rb:259 # LazyMode#weekly_agenda returns multiple notes with different dates when scheduled with daily repeater
rspec /tmp/d20160107-5693-c5flop/spec.rb:283 # LazyMode#weekly_agenda returns note scheduled with weekly repeater
rspec /tmp/d20160107-5693-c5flop/spec.rb:315 # LazyMode#weekly_agenda returns note scheduled with monthly repeater
rspec /tmp/d20160107-5693-c5flop/spec.rb:337 # LazyMode#weekly_agenda does not return note whose start date is in the future
rspec /tmp/d20160107-5693-c5flop/spec.rb:348 # LazyMode#weekly_agenda returns nested notes
rspec /tmp/d20160107-5693-c5flop/spec.rb:390 # LazyMode#where filters by tag
rspec /tmp/d20160107-5693-c5flop/spec.rb:408 # LazyMode#where filters by body text
rspec /tmp/d20160107-5693-c5flop/spec.rb:420 # LazyMode#where filters by header text
rspec /tmp/d20160107-5693-c5flop/spec.rb:432 # LazyMode#where filters by status
rspec /tmp/d20160107-5693-c5flop/spec.rb:443 # LazyMode#where filters by multiple filters
rspec /tmp/d20160107-5693-c5flop/spec.rb:463 # LazyMode.create_file can build notes in the block
История (1 версия и 0 коментара)
Клара обнови решението на 21.12.2015 17:21 (преди около 9 години)