Решение на Втора задача от Елена Орешарова
Обратно към всички решения
Към профила на Елена Орешарова
Резултати
- 5 точки от тестове
- 0 бонус точки
- 5 точки общо
- 21 успешни тест(а)
- 3 неуспешни тест(а)
Код
Лог от изпълнението
..................FFF...
Failures:
1) NumberSet can combine multiple filters with "and" rule
Failure/Error: filter = non_negative & non_zero & mod_3_is_zero
NoMethodError:
undefined method `&' for #<MixedFilter:0xb8f11310>
# /tmp/d20141028-18133-yd8as4/spec.rb:108: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) NumberSet can combine multiple filters with "or" rule
Failure/Error: filter = even | negative | more_than_100
NoMethodError:
undefined method `|' for #<MixedFilter:0xb8f1062c>
# /tmp/d20141028-18133-yd8as4/spec.rb:118: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)>'
3) NumberSet can combine multiple filters with "and" and "or" rules
Failure/Error: filter = even & negative | mod_3_is_zero
NoMethodError:
undefined method `|' for #<MixedFilter:0xb8fa3a08>
# /tmp/d20141028-18133-yd8as4/spec.rb:128: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.0219 seconds
24 examples, 3 failures
Failed examples:
rspec /tmp/d20141028-18133-yd8as4/spec.rb:104 # NumberSet can combine multiple filters with "and" rule
rspec /tmp/d20141028-18133-yd8as4/spec.rb:114 # NumberSet can combine multiple filters with "or" rule
rspec /tmp/d20141028-18133-yd8as4/spec.rb:124 # NumberSet can combine multiple filters with "and" and "or" rules
История (2 версии и 2 коментара)
Елена обнови решението на 25.10.2014 01:38 (преди около 10 години)
Елена обнови решението на 27.10.2014 16:39 (преди около 10 години)