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

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

Build:
Build:
LAST BUILD BRANCH: fix_let_warnings
DEFAULT BRANCH: master
Ran 21 Jul 2013 05:05AM UTC
Jobs 3
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

pending completion
1476

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.

476 of 492 relevant lines covered (96.75%)

64.77 hits per line

Jobs
ID Job ID Ran Files Coverage
3 1476.3 (1.9.3) 21 Jul 2013 05:05AM UTC 0
96.7
Travis Job 1476.3
6 1476.6 (jruby-19mode) 21 Jul 2013 05:05AM UTC 0
95.15
Travis Job 1476.6
9 1476.9 (2.0.0) 21 Jul 2013 05:05AM UTC 0
96.7
Travis Job 1476.9
Source Files on build 1476
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1476
  • c776b888 on github
  • Prev Build on refactor_metadata (#1474)
  • Next Build on refactor_metadata (#1480)
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