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

rspec / rspec-core / 1476 / 3
82%
master: 81%

Build:
Build:
LAST BUILD BRANCH: fix_let_warnings
DEFAULT BRANCH: master
Ran 21 Jul 2013 05:05AM UTC
Files 13
Run time –
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

21 Jul 2013 05:05AM UTC coverage: 96.701%. Remained the same
1.9.3

push

travis-ci

myronmarston
Convert Metadata to use composition rather than inheritance.

- It's best to avoid subclassing core types like Hash.
- Remove runtime module extensions, since that blows MRIs method
  caches and has an affect on perf.
- Instantiation was a two part process: `.new` followed by `process`.
  Conceptually, these belong together, so switch to using a single
  method for instantiation.

Two gotchas I discovered:

- The `include` matcher didn't initially work properly with `Metadata`.
  It uses an `is_a?(Hash)` check to know how to treat the object.
  To solve this, we override `is_a?` to return true for Hash.
- `dup` didn't work as expected. `dup` is used to get a copy that can be
  modified without affecting the original; however, `dup` was simply
  duping the wrapping object, and each retained a reference to the same
  wrapped hash, causing changes on one to show up on the other. I override
  `dup` and `clone` to address this.

469 of 485 relevant lines covered (96.7%)

21.35 hits per line

Source Files on job 1476.3 (1.9.3)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1476
  • Travis Job 1476.3
  • c776b888 on github
  • Prev Job for 1.9.3 on refactor_metadata (#1474.3)
  • Next Job for 1.9.3 on refactor_metadata (#1480.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

© 2026 Coveralls, Inc