• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kernow / shortcode / 145 / 3
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: presenter-inheritance-support
DEFAULT BRANCH: master
Ran 27 Apr 2019 04:06PM UTC
Files 27
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 Apr 2019 04:02PM UTC coverage: 99.545% (+0.009%) from 99.536%
2.2.8, gemfiles/rails_5.1.gemfile

Pull #56

travis-ci

web-flow
Allow presenters to define initialize via inheritance

It would be nice to be able to define a BasePresenter that defines some
base helper methods or even defines a default behavior for the 4
required methods. Then it would be up to any child classes to override
that default behavior.

Currently this is possible for `self.for`, `content`, and `attributes`.
But initialize is weird because `Object` defines initialize and we don't
want that to "count".

So in order to support the initialize being inheritable to child
classes, I've changed the condition around when we throw the validation
error to check the presenter's class ancestory _until_ we reach Object.
At that point we assume failure and raise the validation error.
Pull Request #56: Allow presenters to define initialize via inheritance

656 of 659 relevant lines covered (99.54%)

11.89 hits per line

Source Files on job 145.3 (2.2.8, gemfiles/rails_5.1.gemfile)
  • Tree
  • List 0
  • Changed 4
  • Source Changed 2
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 145
  • Travis Job 145.3
  • c2ca8b8b on github
  • Prev Job for 2.2.8, gemfiles/rails_5.1.gemfile on presenter-inheritance-support (#144.3)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc