Решение на Седма задача от Анджелин Неделчев
Обратно към всички решения
Към профила на Анджелин Неделчев
Резултати
- 2 точки от тестове
- 0 бонус точки
- 2 точки общо
- 11 успешни тест(а)
- 20 неуспешни тест(а)
Код
Лог от изпълнението
FFF.........FFFFFFFFFFFFFFFFF..
Failures:
1) LazyMode LazyMode::Date can parse year
Failure/Error: expect(date.year).to eq(2012)
expected: 2012
got: "2012"
(compared using ==)
# /tmp/d20160107-5693-th7szj/spec.rb:5: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::Date can parse month
Failure/Error: expect(date.month).to eq(10)
expected: 10
got: "10"
(compared using ==)
# /tmp/d20160107-5693-th7szj/spec.rb:10: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)>'
3) LazyMode LazyMode::Date can parse day
Failure/Error: expect(date.day).to eq(3)
expected: 3
got: "03"
(compared using ==)
# /tmp/d20160107-5693-th7szj/spec.rb:15: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)>'
4) LazyMode#daily_agenda returns note scheduled without repeater
Failure/Error: agenda = file.daily_agenda(LazyMode::Date.new('2012-12-12'))
NoMethodError:
undefined method `daily_agenda' for #<LazyMode::File:0x007feba403b500>
# /tmp/d20160107-5693-th7szj/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)>'
5) LazyMode#daily_agenda returns note scheduled with daily repeater
Failure/Error: agenda = file.daily_agenda(LazyMode::Date.new('2012-12-12'))
NoMethodError:
undefined method `daily_agenda' for #<LazyMode::File:0x007feba4018b90>
# /tmp/d20160107-5693-th7szj/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)>'
6) LazyMode#daily_agenda returns note scheduled with weekly repeater
Failure/Error: agenda = file.daily_agenda(LazyMode::Date.new('2012-12-12'))
NoMethodError:
undefined method `daily_agenda' for #<LazyMode::File:0x007feba3ff5500>
# /tmp/d20160107-5693-th7szj/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)>'
7) LazyMode#daily_agenda returns note scheduled with monthly repeater
Failure/Error: agenda = file.daily_agenda(LazyMode::Date.new('2013-01-12'))
NoMethodError:
undefined method `daily_agenda' for #<LazyMode::File:0x007feba3feb488>
# /tmp/d20160107-5693-th7szj/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)>'
8) 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 `daily_agenda' for #<LazyMode::File:0x007feba3fcd460>
# /tmp/d20160107-5693-th7szj/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)>'
9) LazyMode#daily_agenda returns nested notes
Failure/Error: agenda = file.daily_agenda(LazyMode::Date.new('2012-08-06'))
NoMethodError:
undefined method `daily_agenda' for #<LazyMode::File:0x007feba3fc9658>
# /tmp/d20160107-5693-th7szj/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)>'
10) LazyMode#weekly_agenda returns note scheduled without repeater
Failure/Error: agenda = file.weekly_agenda(LazyMode::Date.new('2012-12-06'))
NoMethodError:
undefined method `weekly_agenda' for #<LazyMode::File:0x007feba3f8bda8>
# /tmp/d20160107-5693-th7szj/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)>'
11) 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 `weekly_agenda' for #<LazyMode::File:0x007feba3f74298>
# /tmp/d20160107-5693-th7szj/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)>'
12) LazyMode#weekly_agenda returns note scheduled with weekly repeater
Failure/Error: agenda = file.weekly_agenda(LazyMode::Date.new('2012-12-10'))
NoMethodError:
undefined method `weekly_agenda' for #<LazyMode::File:0x007feba3f5f8e8>
# /tmp/d20160107-5693-th7szj/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)>'
13) LazyMode#weekly_agenda returns note scheduled with monthly repeater
Failure/Error: agenda = file.weekly_agenda(LazyMode::Date.new('2013-01-10'))
NoMethodError:
undefined method `weekly_agenda' for #<LazyMode::File:0x007feba3f56db0>
# /tmp/d20160107-5693-th7szj/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)>'
14) 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 `weekly_agenda' for #<LazyMode::File:0x007feba3f4cc98>
# /tmp/d20160107-5693-th7szj/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)>'
15) LazyMode#weekly_agenda returns nested notes
Failure/Error: agenda = file.weekly_agenda(LazyMode::Date.new('2012-09-05'))
NoMethodError:
undefined method `weekly_agenda' for #<LazyMode::File:0x007feba3ec3010>
# /tmp/d20160107-5693-th7szj/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)>'
16) LazyMode#where filters by tag
Failure/Error: @agenda = file.daily_agenda(LazyMode::Date.new('2012-12-12'))
NoMethodError:
undefined method `daily_agenda' for #<LazyMode::File:0x007feba3eaf8d0>
# /tmp/d20160107-5693-th7szj/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)>'
17) LazyMode#where filters by body text
Failure/Error: @agenda = file.daily_agenda(LazyMode::Date.new('2012-12-12'))
NoMethodError:
undefined method `daily_agenda' for #<LazyMode::File:0x007feba3ea00d8>
# /tmp/d20160107-5693-th7szj/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 header text
Failure/Error: @agenda = file.daily_agenda(LazyMode::Date.new('2012-12-12'))
NoMethodError:
undefined method `daily_agenda' for #<LazyMode::File:0x007feba3e945f8>
# /tmp/d20160107-5693-th7szj/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 status
Failure/Error: @agenda = file.daily_agenda(LazyMode::Date.new('2012-12-12'))
NoMethodError:
undefined method `daily_agenda' for #<LazyMode::File:0x007feba3e7b878>
# /tmp/d20160107-5693-th7szj/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 multiple filters
Failure/Error: @agenda = file.daily_agenda(LazyMode::Date.new('2012-12-12'))
NoMethodError:
undefined method `daily_agenda' for #<LazyMode::File:0x007feba3e60c80>
# /tmp/d20160107-5693-th7szj/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)>'
Finished in 0.01466 seconds
31 examples, 20 failures
Failed examples:
rspec /tmp/d20160107-5693-th7szj/spec.rb:3 # LazyMode LazyMode::Date can parse year
rspec /tmp/d20160107-5693-th7szj/spec.rb:8 # LazyMode LazyMode::Date can parse month
rspec /tmp/d20160107-5693-th7szj/spec.rb:13 # LazyMode LazyMode::Date can parse day
rspec /tmp/d20160107-5693-th7szj/spec.rb:119 # LazyMode#daily_agenda returns note scheduled without repeater
rspec /tmp/d20160107-5693-th7szj/spec.rb:141 # LazyMode#daily_agenda returns note scheduled with daily repeater
rspec /tmp/d20160107-5693-th7szj/spec.rb:163 # LazyMode#daily_agenda returns note scheduled with weekly repeater
rspec /tmp/d20160107-5693-th7szj/spec.rb:186 # LazyMode#daily_agenda returns note scheduled with monthly repeater
rspec /tmp/d20160107-5693-th7szj/spec.rb:208 # LazyMode#daily_agenda does not return note whose start date is in the future
rspec /tmp/d20160107-5693-th7szj/spec.rb:219 # LazyMode#daily_agenda returns nested notes
rspec /tmp/d20160107-5693-th7szj/spec.rb:237 # LazyMode#weekly_agenda returns note scheduled without repeater
rspec /tmp/d20160107-5693-th7szj/spec.rb:259 # LazyMode#weekly_agenda returns multiple notes with different dates when scheduled with daily repeater
rspec /tmp/d20160107-5693-th7szj/spec.rb:283 # LazyMode#weekly_agenda returns note scheduled with weekly repeater
rspec /tmp/d20160107-5693-th7szj/spec.rb:315 # LazyMode#weekly_agenda returns note scheduled with monthly repeater
rspec /tmp/d20160107-5693-th7szj/spec.rb:337 # LazyMode#weekly_agenda does not return note whose start date is in the future
rspec /tmp/d20160107-5693-th7szj/spec.rb:348 # LazyMode#weekly_agenda returns nested notes
rspec /tmp/d20160107-5693-th7szj/spec.rb:390 # LazyMode#where filters by tag
rspec /tmp/d20160107-5693-th7szj/spec.rb:408 # LazyMode#where filters by body text
rspec /tmp/d20160107-5693-th7szj/spec.rb:420 # LazyMode#where filters by header text
rspec /tmp/d20160107-5693-th7szj/spec.rb:432 # LazyMode#where filters by status
rspec /tmp/d20160107-5693-th7szj/spec.rb:443 # LazyMode#where filters by multiple filters
История (1 версия и 0 коментара)
Анджелин обнови решението на 21.12.2015 13:01 (преди около 9 години)