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

kernow / shortcode / 152
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: presenter-inheritance-support
DEFAULT BRANCH: master
Ran 01 May 2019 04:19PM UTC
Jobs 8
Files 27
Run time 9min
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

pending completion
152

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

15 of 15 new or added lines in 4 files covered. (100.0%)

652 of 655 relevant lines covered (99.54%)

71.26 hits per line

Jobs
ID Job ID Ran Files Coverage
1 152.1 (2.5.5, gemfiles/rails_5.1.gemfile) 01 May 2019 04:20PM UTC 0
99.54
Travis Job 152.1
2 152.2 (2.5.5, gemfiles/rails_5.2.gemfile) 01 May 2019 04:19PM UTC 0
99.54
Travis Job 152.2
3 152.3 (2.6.3, gemfiles/rails_5.1.gemfile) 01 May 2019 04:22PM UTC 0
99.54
Travis Job 152.3
4 152.4 (2.6.3, gemfiles/rails_5.2.gemfile) 01 May 2019 04:22PM UTC 0
99.54
Travis Job 152.4
5 152.5 (jruby-head, gemfiles/rails_5.1.gemfile) 01 May 2019 04:26PM UTC 0
0.0
Travis Job 152.5
6 152.6 (jruby-head, gemfiles/rails_5.2.gemfile) 01 May 2019 04:26PM UTC 0
0.0
Travis Job 152.6
7 152.7 (ruby-head, gemfiles/rails_5.1.gemfile) 01 May 2019 04:29PM UTC 0
99.54
Travis Job 152.7
8 152.8 (ruby-head, gemfiles/rails_5.2.gemfile) 01 May 2019 04:29PM UTC 0
99.54
Travis Job 152.8
Source Files on build 152
  • Tree
  • List 0
  • Changed 4
  • Source Changed 2
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Travis Build #152
  • Pull Request #56
  • PR Base - master (#151)
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